Problem with an image upload script

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
olidenia
Forum Newbie
Posts: 19
Joined: Mon Apr 28, 2008 12:38 pm

Problem with an image upload script

Post 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.
User avatar
Bill H
DevNet Resident
Posts: 1136
Joined: Sat Jun 01, 2002 10:16 am
Location: San Diego CA
Contact:

Re: Problem with an image upload script

Post by Bill H »

You might try posting this in the "PHP Code" forum.
Post Reply