I have a form to upload images and to insert names and paths
into a
database. The images are really uploaded, but the database
update
doesn't work. The code is:
mysql_select_db("books");
$sql = "INSERT INTO filestore SET
main_pic1orig='hauptpics/$image_stored',
main_pic1small='hauptpics/$img_name'";
$action = mysql_query($sql);
$sql = "UPDATE hauptliste SET
main_pic1orig='hauptpics/$_POST[main_pic1orig].jpg',
main_pic1small='hauptpics/$_POST[main_pic1small].jpg',
WHERE main_id='$_GET[main_id]'";
$action = mysql_query($sql);
echo "<p><b>Added files:</b></p>";
echo "<p>Original: ".$image_stored."</p>";
echo "<p>Thumbnail: ".$img_name."</p>";
Nothing is displayed. So there is something broken. In the
master page
there is a link to the page "insert images". If it is record
#5, the
upload page inserts two images, 5.jpg for the original image,
5k.jpg for
the thumbnail. The corresponding fields in the form are: