brcolow
11-16-2002, 03:54 PM
Hey, ok I have this script that uploads pictures to a file on my webserver, that works perfectly but im having trouble writing the filename to a mysql database, my query is as follows:
$sql ="INSERT INTO `revscreenshots` (id, name) VALUES ('$id', '$name')";
$result = mysql_query($sql);
if ($result)
echo "Your screenshot has been uploaded to the database.";
and i define id and name here,
$name = $HTTP_POST_FILES['userfile']['name'];
$id = $HTTP_GET_VARS['id'];
It uploads the pictures to the file (another part of the script) but after that it doesnt write them to the database, anyone know why?
$sql ="INSERT INTO `revscreenshots` (id, name) VALUES ('$id', '$name')";
$result = mysql_query($sql);
if ($result)
echo "Your screenshot has been uploaded to the database.";
and i define id and name here,
$name = $HTTP_POST_FILES['userfile']['name'];
$id = $HTTP_GET_VARS['id'];
It uploads the pictures to the file (another part of the script) but after that it doesnt write them to the database, anyone know why?
