Page 1 of 1

Problem with an image upload script

Posted: Wed Feb 11, 2009 4:22 am
by olidenia
I have a problem with a script, I'm atempting to write the path of an image tom my database and I want to turn it in to a $imagen1 string.

My problem is here:<?php $imagen1="<img src=/"image_files/$_REQUEST['show_image']/"/>" ; ?>

...

Code: Select all

<?php if(isset($_REQUEST['show_image']) and $_REQUEST['show_image']!=''){?>
<p>
    <img src=/"image_files/$_REQUEST['show_image']/"/>
</p>
 
<?php $imagen1="<img src=/"image_files/$_REQUEST['show_image']/"/>" ; ?>
 
<?php }?>
 
<?php include ("include/sqlconecta.php");?>
 
<?php
 
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }
 
mysql_select_db("automotor_admin", $con);
 
mysql_query("UPDATE img SET img1 = '$imagen1'");
 
mysql_close($con);
?>
..
Thank you for your help before hand.

Re: Problem with an image upload script

Posted: Wed Feb 11, 2009 10:32 am
by Bill H
You might try posting this in the "PHP Code" forum.