faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

5 of 8 people (63%) answered Yes
Recently 5 of 8 people (63%) answered Yes

Entry

Can I use an image link that when clicked opens up a php file and inserts a specified image into it?

Mar 20th, 2008 16:55
ha mo, Dustin Spicuzza, Jakub Vrana, Kevin Richards,


Yes. You can have on the main page e.g.
<a href="script.php?image=zoomed.jpg"><img src="..."></a>
script.php can be
HTML headers
<img src="<?php echo htmlentities($_GET["image"]); ?>">
HTML footers
** It should be noted that you should NEVER echo out a user input
parameter directly, as it may make you vulnerable to an XSS-type
exploit. Always use something like htmlentities to ensure that only that
the user cannot arbitrarily display html/javascript
http://www.tantofa.com
http://www.fantofa.com
http://www.mantofa.com
http://www.tanpola.com
http://www.tampola.com
http://www.yamot.com
http://www.mozmar.com
http://www.templatestemp.com