Creating An Hyperlink From A Sql Query Image
I have an sql query that pulls an image filename out and displays that image.
echo "<img src='/images/thumbnails/{row["Filename"]}' width='75' height='50'>";
I have another images folder with the larger pictures, they also have the same filename. What I'm trying to do with no success! is for the thumbnail image displayed from the query be an hyperlink to a blank page and display the larger image.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Hyperlink Query
I have the following line that prints out a record with a link, when you click the link you get more column information in the record. I want to add another field (State) so that I can narrow down the results. How can I pass both the hcounty as I'm doing now, along with state? to the state7.php file? print " <td><bgcolor=#000000><font color=#000000 font color=#000000 face=Tahoma size=2 ><A href='state7.php?searchid=$line[hcounty]'><img src='buttondetail.gif' border=Ɔ'></img></td> ";
Basic Hyperlink Query
I have a php series of scripts/programs/files which provide a simple calendar/scheduler program. When either an email or web address/hyperlink are displayed within the output, they seem to have the browser default link colours and underline. Altho the output table/content is within a div in the web page, I seem to be unable to apply CSS styles to the div contents in this case. I have even tried !important to no avail. There does not seem to be any HTML tags in the PHP controlling them. Is it possible for anyone to help me to apply CSS styles to these links without you being able see the PHP etc? Ignore this if I am asking for the impossible/impractical.
Click A Hyperlink To Query MYSQL W/PHP - How?
Like so many questions this involves MYSQL and the PHP (or Perl) layer. I'm going to have html in text fields and there's going to be what normally would be an internal link to another place in the same document. But in this case, Code: <a href="#futherdown">next title</a> is not in the html document. When a user clicks this link I want to query the DB and append/render the queried record on the I guess existing (refreshed) page. What's a strategy to make a hyperlink query via PHP?
Changing An Image For Text/hyperlink
I have the following piece of code, which uses an image as a button. I want to remove the image and just have some text/hyperlink which has the same effect when clicked? Would someone please help and advise what needs to be changed... <?php echo tep_image_submit('button_wishlist.gif', 'Add to Wishlist', 'name="wishlist" value="wishlist"');?> ....
Creating Watermark With Another Image & Resizing Watermarked Image
I have a script that watermarks an image; it adds a transparent gif over my base image. I also have a script to resize my image. But here is where the problem comes in; these are two different scripts - none of the code will interconnect (variable wise - that is), so I am having a problem trying to piece together a PHP GD Image code that will create a watermark and will then be resized. Below is my code for resizing my image, but from there - I know I need to use imagecreategif somewhere and imagecopy somewhere; but where, I do not know. Code:
Creating Image From Uploaded Image And Transparent PNG
Say the client wants to be able to change the image, but not the text treatment, and doesn't have the Photoshop knowledge to actually replace it and re-save it themself. Is there anyway to use a PNG with the rounded edges, text treatment, and transparent center, have the client upload a standard rectangular-shaped image, and use PHP to layer the uploaded image underneath the transparent one, creating a new image file?
Creating The Query On The Fly
I'm trying to create an UPDATE query string based on results from a foreach loop. My concern is how to deal with commas for multiple array values - PHP Code:
MySQL Creating Links From Query
As I am still learning PHP could someone tell tell me how to achieve the following? Display only the first four records from a sql query and have 'next page' links and number of pages so users can navigate the next four records and so on. The usual navigation you find on search engines. I have the query and the num_rows function, I just need to know how to implement it.
Creating Directories From MySQL Query
I'm trying to create a subdirectory within a directory. The directory uses $rows['link'] from the category table, and the subdirectory uses $subcategory2 from the subcategory table. The directory that gets created is always based on the last record in the table, rather than the parent. I have tried using another query, but only the subdirectory gets created then......
Creating A Date Range Query?
If I have a date field, and want to select all records that are older then 30 days from today, is there a way to query MySQL for this? Code: $todaydate=date("Y-m-d"); $query = "SELECT * FROM members WHERE joined_date = '$todaydate-30' "; I know this will not work, but it's functionaly what I am trying to do.
Creating A Faster Mssql Query
I have a series of tables that I need to sort through. meaning get one peace of info from one table to get the next peace form the next table and so on. My problem is I only know how to write the code to do it in that order. Code:
Creating An Image
I am making a links page for my site that takes the links out of the database and displays the name on a button, but the text on each button is different lengths and I was wondering if there was a way I could align them center on the button? This is the button.php code: <?php header ("Content-type: image/png"); $string = $_GET['text']; $im = @imagecreatefrompng ("button1.png"); $text_color = imagecolorallocate ($im, 255, 255, 255); imagettftext($im, 10, 0, 5, 35, $text_color, "c:phpfontsariblk.ttf", "$string"); imagepng ($im); imagedestroy($im); ?>
Creating A Image Gallery
I'm working on a image gallery and I can't figure out the best way to do it. Is it such a good idea to store all images on a MySql database or locally? If i'm going to store images on a MySql database, how is this done, can you upload a whole directory? Right now it's coded to load images locally but then comes the problem how to sort everything up, like show 10 images per page, 5 per row etc. I would like any sugguestions on this. And one more thing, how do I display more than one image per row? Not sure if that's making any sense but here's the code i'm using:
Creating An Image File With Only PHP
Is it possible to create an image file from a string using only functions from core PHP (in other words, without 3rd party libraries/applications)? I'm interested in any image file that is displayable without plugins or helper applications, like jpg, png, gif.
GD Creating A Watermarked Image
I wrote a function which watermarks an image. The function works, but i can't figure out how to output the image into a file. I want to feed this function a URL, $image..and at the end of this code, I want to overwrite the $image file with the new watermarked $image file. Im getting an error stating that this file cannot be opened. <?php function watermark($image) { //$image = $HTTP_GET_VARS['image']; // Useful if using in an img tag to call images //$image = str_replace(array("/", ".."), "", $image); // Prevent abuse $overlay = '/home/httpd/vhosts/picmonkey.com/httpdocs/ADMIN/overlay.png' $dir = '/home/httpd/vhosts/picmonkey.com/httpdocs/IMAGEUPLOADS/' // A default image for the demo...remove if you wish. // Set offset from bottom-right corner $w_offset = 0; $h_offset = 0; $extension = strtolower(substr($image, strrpos($image, ".") + 1)); // Load image from file switch ($extension) { case 'jpg': $background = imagecreatefromjpeg($image); break; case 'jpeg': $background = imagecreatefromjpeg($image); break; case 'png': $background = imagecreatefrompng($image); break; case 'gif': $background = imagecreatefromgif($image); break; default: die("Image is of unsupported type."); }
Creating And Presenting An Image In Php
Maybe this isn't really a PHP problem. But it's possible that PHP has a good solution for it. I have a php page which collects some input from the user, constructs an image, and then displays it to the user. The line of php that does the actual presentation to the user is: print "<a href='$string'><img src='$string' width=784 height=431 border=0></a>"; where $string is something like 'r.pl?ar=7;cl=10' so the user gets to see a (large) thumbnail, and can then click on it to see the full-sized version. (The actual nitty-gritty of the image creation is done in Perl not PHP. I wrote it before I became more familiar with PHP and learned that PHP uses the GD library. I could rewrite it into PHP if I have to.) My problem is that my code calls r.pl twice, to do the same thing: once when the page is created, and once when the user clicks on the image. This wastes quite a bit of cpu time on the server, and slows the response for the user. What I would prefer to do is call r.pl once, put the resulting image in some kind of temporary session-specific file on the server (or in its memory), and then use this temporary thing twice, in place of $string above. Is this somehow possible?
Creating A TIFF Image
I just wondered if there was a function to create a TIFF image using either Image Magick or the GD Library? I have searched through the PHP manual, this forum, blogs and Google and Can't find anything of any use. I thought that imagetiff() might work, but no such luck.
Creating Temporary Table From Full-text Query
i'm using a full-text search on my db which works fine, but now i'm working on filtering the results further, like products in range of prices. my logic is to simply SELECT them out of the temporary table, only if it would be created. i don't think i need to paste any code since i think you get the idea.
Creating Dynamic Hyperlinks With User Id's In Php Query
Im dabbling with PHP and trying to write a new search.php file to scan for specic users in my dating website and then display the users along with individual links to their profile. $profile = $row["id"]; -- this field takes profile ID from mysql database The profile field pulls in an ID field from a mysql database for each record. I need to integrate this fields value into the hyperlink when the results are returned so it has a list of all users each with an individual hyperlink to their profile. Then users can click and access the profile of a specific user. Code:
Creating An Image Out Of Multiple Images
I'm designing an application where I want to create a dynamic image out of a matrix of small images, selected by some complex mysql-queries. The small images, each are 30x30 pixels, and the size of the big image will be approx. 300x270 pixels. (so there will be 10 rows, and 9 cols of images) My question: How do I import the small images en embed them into a new, big image?
Creating Thumbnail Image Of A Webpage ?
How do i create a image of webpage in php? Basically what I am looking for is "Create a small image (Thumbnail) of a webpage. Let me know about your thought.
Dynamically Creating An Image With Imagecreate()
I have a multitude of images that I am trying to bring up dynamically depending on the scenario. These images are different sizes. To complicare things just a little more, I am rewriting a javaScript. Am I heading into the correct direction? Here is the original JS that I am attempting to rewrite: (This is most of the way translated to PHP)
Creating An Image Out Of Multiple Images
I have some questions regarding image manipulation: - Is it possible add an alpha channel to an image via PHP? - Can I multiply an image with another image creating a new image? I want to create border with transparency around images uploaded to an photalbum.
Passing Variables To An Image Creating Php File
I have been working with the gd functions in PHP to render an image. I was able to solve the (apparently) usual header problems and such like via searching through this page and help documentation, such that I am now able to produce an image by doing the following : Code:
Random Image From MySQL Query
in mysql engine 3.23.** and above, I can use this query : SELECT * FROM tablename WHERE clauses ORDER BY RAND() LIMIT 1 but when I use mysql engine 3.22.** and below, the query does not work, does anyone have any trick to have the random result ?
GetImageSize() Vs. MySQL Query For Image Height/width
Does anyone know how efficient the GetImageSize function is? We're building a MySQL database with about 20,000 images and serving it with PHP. We're expecting 3000-4000 visits (not hits) per day and there will be about 5-10 images per page view. We want to keep load time to a minimum. Would we be better off including width and height info in the database for each image (and retreive with an SQL query) rather than using GetImageSize?
Upload & Query MySQL Info Database With Image Files
I want a database I can enter information and upload a photo from a web form. Then I want to query that database for the text info with its related photo and display it (formatted) in a browser (html). Summary: 1. upload photo's and text information to database with my add article form. 2. Query the database and page the results with the text and related photo. It comes in three parts: 1. add_article.php [Text / Photo Upload Form] 2. insert_article.php [Inserts into database] 3. articles.php [View Output] Here is what I have this far:
Array Query - For Adding Alt Text To Multiple Image Upload Form
I've set up a form for uploading multiple images and I am writing the urls to a database, which is queried and outputs the images on a web page. This works fine, however, I also want to add alt/title text for each image upload but can't quite seem to get it working. I'm pretty new to PHP so my knowledge of how to use arrays is fairly limited. Code:
GD Functions - Creating A "Simple" Image
I want to create a "simple" square image at a variable height & width.. the image would be either transparent or perhaps use a background color.. And contain a "number" positioned in the top left corner maybe like: ----------------- - 1 - ----------------- Like I said "simple".. since I've yet to look into this, and I've yet to work with the gd library.. I'm wondering if someone can point me to some "examples".. Or perhaps, you already have a function to do just that.. I'm starting to work on a little calendar function, which I've written already.. I basically want to make it a little "schedular" app.. I want to create the image for an "onclick" event.. which opens a "view" of the selected day(s) event(s)... The image will give those (who use those "ancient" browsers) something to click on.. since some older browser do not support "onClick" event assigned to a table cell.
Hyperlink
Im making a select statement and the outputs are in a table but i want the entry of a column to be hyperlink to take to another page Code:
Displaying A Hyperlink
I pull a string out of MySQL and display it in an html page using PHP. It automatically becomes a hyperlink but if it is a link to a document (www.web.com/test.doc) it won't translate it into a hyperlink. Does anybody know how I might do this?
Replacing Www... With Hyperlink
i want to replace all entries of beginning with 'www.' and ending with ' ' with a hyperlink to that substring such as: www.google.com := <a href="www.google.com">www.google.com</> can anyone tell me the easiest way to do this?
HyperLink Validatation
I am wondering what approach I could used to validate links. I am building a simple portal type index and I would like to be able to check for broken links weekly. The Database already has a field for link status. I would like to create a script that checks for broken links and changes the status so a human can follow up on it. I am also wondering about how one would “limit” this program. I mean I don’t care if it takes 2 hours just as long as it does run rampant and cause issues with my host. Any thoughts…? I am not looking for a complete solution just a point in the right direction.
Hyperlink Per Mail
can anybody tell me how to sen a hyperlink using the php mail function. If I send a <a ref ...> it just turns up in plain text. Whats the trick
URL Text To Hyperlink
here is what i have $threadx = preg_replace("/((ht|f)tp://[^s&]+)/", "<a href="$1">$1[/url]", $threadx); $threadx = preg_replace("/(S+@S+.w+)/", "<a href="mailto:$1">$1[/url]", $threadx); can someone tell me how to make it better, this one completly screws up existing hyperlinks and <img src=""> tags... need to fix it somehow..
Hyperlink With Parameters
Is this how you print a hyperlink passing parameter action , id, qty to another php script? And printing HTML inside php? I giving three sample code in my program. I use quotation around HTML TAG and code so can read by php print command. 1. Hyperlink with parameter to pass print "<a href = "cart.php?action=Add&id=" . $column['SKU'] . "&qty=1">Add Item</a></font></td></tr>"; 2. Printing HTML tag with PHP print command print "<TR><TH>Title</TH><Price</TH><TH>Description</TH><TH>Add Item</TD></TR>"; 3. Here I try to print a drop down list with Javascript onChange event. Notice that I use concatenation between HTML TAG and PHP code. I use to respesent quoatation mark. // print the drop down that will update the qty instantly using Javascript onChange event // the following syntax will look like this in regular HTML code // <select name = "$column['SKU']" onChange = "upDateQty(this)"><option Selected>i</option></select> print "<tr width = 15% height = 25><td width = 15% height = 25><font face = verdana size = 1 color = black>"; print "<select name = "" . $column['SKU'] . ""onChange = "updateQty(this)""; for ($i = 0; $i <= 20; $i++) { print "<option"; if ($rows['QTY'] == $i) { print "SELECTED"; } print ">" . $i . "</option>"; } print "</select></font></td>";
Using A Hyperlink To Retrieve Data? Is It Possible Without?
I was wondering if it is possible to get data from a database using a hyperlink instead of a form? My situation is I have a page with a list of products (data from a mysql table) and I want to keep the info on the page small so I have limited the description and left out some info. what I want is a link at the bottom of each product that says "more details" and when clicked it creates a new page on the fly to show more info. is it possible to do this without javascript? If so How.
Hyperlink And Passing Of Variables.
I know three ways to pass variables form one page to another. The first one is to declare and set session variable. In this case if one goes to another page (by clicking on hyperlink or pressing a button) value of a session variable will be automatically seen on the new page. The second way is to set hidden variables in the form and go to new page by execution of this form (press a button or enter), and the last way, which I know, is in the declaration of hyperlink after name of a new page put after "?" names and values of variables. Sometimes I need to use the third way. However I do not like that after new page is loaded in the address line of browser one can see all variables (names and values). Can one avoid this problem?
Hyperlink And Posting To New Page!
I have a page where I have done a successful query and get search results displayed. Now I would like a link activated so that they can click on the name and go to new page with further details about that company like address hours etc.
Hyperlink - JS Function & PHP Variable
if its possible to call a JavaScript function and pass on a PHP variable in 1 hyperlink? I need to pass on variable: $lang=english And call JavaScript Function: javascript:loadScript1()
Executing Code Within A Hyperlink
I am writing a photo gallery and suppose 8 photos are displayed. When the user clicks on a button under the picture, I want it to add that picture name to a "favorites" list within the session data, but NOT leave the page the user is on. How could I do this?
Need A Script To Tell Me Where A Hyperlink Originated
Not sure if this is a php or an html question but I'll post it anyway. I have multiple thumbnail images on my catalogue page catalogue.php and they are all hyperlinked to a single page called desc.php that will give an enhanced description of the product selected. I want the desc.php page to print the contents of a text file named ?.txt based on which image was clicked on in my catalogue page. example: if I click on 1.jpg in my catalogue then I want the file 1.txt to be selected and printed on my description page. I know how to print the contents of a textfile and I know how to disect the strings of the filenames so that I can associate 1.txt with 1.jpg. What I dont know is how to retrieve the name of the image file that was clicked on the catalogue page within my script for the desc.php page If I didn't use a hyperlink image and used a form submit button instead on my catalogue page then of course I could use something like: $filename = $_POST['filename'] Hope you understood all of that.
Table Output As Hyperlink ?
i am trying to create a table generated from a MySQL query with some of the output as hyperlinks. in this way i intend that the users of the site click to see the customers registered and then click on the "hyperlink" of their customer id, which will navigate them to details about that user on another php page. PHP Code:
Passing Variables With Hyperlink
I've managed to get a MySQL database up and running and can display the data with PHP to a web page. What I'd really like to do is click on a field on the web page to display another page based on that value. As an example using a membership database, I display an index of member no and member name to a web page. I'd like the member no to be a link that when clicked on would allow me to display the entire member record. I just need to know how to pass the variable from the hyperlink to a php script to do the query.
Hyperlink To An Excel File
I have a hyperlink to an Excel spreadsheet but I'm having a bit of trouble with it. My first problem was that IE6 integrates Excel into the IE window when you click an Excel link. I overcame that by having a dummy Excel file run that had VBA code to launch the real application in a new window. That's probably too much info, but there it is. Moving on. My problem is the users will be opening up this VBA Excel application of mine from our Intranet. When they click on the link, the dummy Excel file runs, that in turn launches the real application and all is well and good. Except for one thing. When the user is done or goes back to the IE Intranet window where they launched the application, this is the error that is displayed: The page cannot be displayed: The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. My two solutions were to either have the link do two things simulatenously. You would click on the app link and it would run the application and it would also reload the Intranet home page. My second solution was to have them click the link and then it would go back to the previous page they were on all in the same click procedure/event/whatever. Code:
How To Download File From Hyperlink?
How to download file from hyperlink? I successfully created a pdf file and stored the file name,location inside a table. Now i am showing the link on the page and when user click this link i wish to open this pdf file from the server on the user desktop in a popup window. $filelocation == http://locatiion/pdf/xyz.pdf i.e, echo "<a href='<?php $filelocation ?>'Click to open</a>"; Its bit scary when i read another thread about downloading big files, although my files are very tiny i mean 30kb in size.
Extractng Text From Hyperlink
I need to extract the text within anchor tags for use in building another hyperlink. In other words, if I have something like this: <a href="http://www.something.php?id=12">Blah blah blah</a> I need to get the 'Blah blah blah' part. I'm thinking that a regular expression is the way to go, but I'm having difficulty seeing how to deal with the stuff in the href attribute.
|