Hello,
I would like to know how I can add a varible to the path below;
$uploaddir = 'c:/mysql/data/mylogin/upimages/';
print "<pre>";
if (!copy($FILES['userfile']['tmp_name'], $uploaddir . $FILES['userfile']['name'])) {
print "File is valid, and was successfully uploaded. Here's some more debugging info:\n";
print_r($_FILES);
$sql="INSERT INTO myimagexx (imagefilepath) VALUES ('$uploaddir')";
$result=mysql_query($sql, $conn) or die(mysql_error());
echo $result;
//mysql_select_db("mylogin",$conn) or die("Could not select database");
What I'm trying to do is insert the record that includes the path of the directory where the uploads are to go and the image included in the path. This file has been uploaded from an html file. I user clicks and browes his/her directory on their computer than uploads it to the assigned directory.
I can insert the path into the table but how do you attach the file name with it?
I hope my question was clear enough.
Any assistance will be helpful.
Thank you.
KJ