Is it possible to upload a file AND submit other data in the same form AND have it send itself the results?
This is what im trying to do...
<?
if ($REQUEST_METHOD == "POST")
{
if ($img_name != "")
{
copy("$img", "/home/zikesdom/public_html/images/$type/$img_name")
or die("Couldn't copy the file!");
}
else
{
die("No gallery file specified");
}
if ($thumbnail_name != "")
{
copy("$thumbnail", "/home/zikesdom/public_html/images/$type/thumbnails/$img_name")
or die("Couldn't copy the file!");
}
else
{
die("No thumbnail file specified");
}
mysql_connect ("server", "db", "pass");
mysql_select_db (zikesdom);
$sql = "INSERT INTO graphics (name, filename, type, artist, description) VALUES ('$name', '$img_name', '$type', '$artist', '$description'";
$result = mysql_query ($sql);
if ($result = mysql_query($sql))
{
print ("Insert Successful");
}
else
{
print ("ERROR ");
echo mysql_errno().": ".mysql_error()."<br>";
}
}
else
{
print (" ");
}
?>
Please help!!!!!