Retrieve and upload image in php using mysql
问题 I have a problem in retrieving an image from a database. Here is the code that uploads the image to the database: <form method="post" action="index2.php" enctype="multipart/form-data"> <input type="file" name="drimg2"/> <input type="submit" name="submit2" value="Save"/> </form> <?php if(isset($_POST['submit2'])) { $con=mysql_connect("localhost","root","root"); mysql_select_db("test",$con); $imgname1=$_FILES['drimg2']['name']; echo $imgname1; $imageextension1 = substr(strrchr($imgname1,'.'), 1