hi, sorry for insisting on the same thread....
ok another ....question:
do I have to pass a parameter to every function in the file that involves working with a query and a submit form ?
I think I may have the same problem with the submit_image() function listed below:
<?php
function submit_final()
{
$date = date("M d, Y");
$conn = db_connect();
$time = time();
$sql = "insert into imagesdb (filename, image, stars, plot, poster) values ('$filename', '$image', '$stars', '$plot', '$poster')";
$result = mysql_query($sql,$conn);
if (!$result) {
print "There was an error on dbase executing.<PRE>$sql</PRE>";
print mysql_error();
exit;
}
if ($poster_name != "")
{
move_uploaded_file("$poster", "/home/mywebbsite/public_html/images/images/$poster_name") or die("Couldn't Upload Your File.");
} else {
die("Didnt upload any file at all!");
}
if (!$story)
{
$story = mysql_insert_id();
$sql = "update imagesdb set poster = '$poster_name' where id = $story";
$result = mysql_query($sql,$conn);
echo "<center><font face='arial' size='2'><b>Well done !</b></font></center>";
}
}
?>
I call my submitfile.php like this:
<?php
include functions.php
// bla bal bal
submit_final();
?>
thanks for answering 🙂