basic-php-07-showimage-rev03.php / php
<?php //connect to the database link) or die (mysql_error()); //make variables available _REQUEST['id']; //**INSERT THE FOLLOWING LINE: if (isset(mode = mode = ''; } //**END OF INSERT //get info on the pic we want id'") or die(mysql_error()); getpic); extract(image_filename = "images/" . width, type, image_filename); ?> <html> <head> <title>Here is your pic!</title> </head> <body> <h1>So how does it feel to be famous?</h1><br><br> <!--INSERT THE FOLLOWING LINES: --> <?php if (<font color=\"CC0000\"><em><strong>Your image has been modified.</strong></em></font>"; echo "<img src=\"" . image_filename . "\" align=\"left\" " . <p>Here is the picture you just uploaded to our servers:</p> <img src="<?php echo image_filename; ?>" align="left" <?php echo <strong><?php echo image_caption; ?></strong><br> It is <?php echo <?php echo height; ?> pixels high.<br> It was uploaded on <?php echo <?php echo image_username; ?>. <!--INSERT THE FOLLOWING LINES:--> <?php //end the else } ?>
<p><em><strong>Modifying Your Image</strong></em></p> <form action=<modifyimage.php> method="post"> <p> Please choose if you would like to modify your image with any of the following options. If you would like to preview the image before saving, you will need to hit your browser's 'back' button to return to this page. Saving an image with any of the modifications listed below <em>cannot be undone.</em> </p> <input name="id" type="hidden" value="<?php echo <input name="bw" type="checkbox">black & white<br> <!--INSERT THE FOLLOWING LINE--> <input name="text" type="checkbox">embedded caption<br> <!--END OF INSERTED LINES--> <p align="center"> <input type="submit" name="action" value="preview"> <input type="submit" name="action" value="save"> </p> </form> <!--END OF INSERTED LINES--> </body> </html>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.