Hi,
I have a really odd problem. I have a basic upload form that passes the data onto upload.php and then this moves the file and creates an query
<?php
$filename = $_FILES["Filedata"]["name"];
$filesize = $_FILES["Filedata"]["size"];
$filetype = $_FILES["Filedata"]["type"];
$urlid = $_COOKIE["urlid"];
$username = $_COOKIE["username"];
$datetime2 = date('Y-m-d H:i:s');
$datetime = date('dmyHi');
$newfilename = "$datetime".'_'."$filename";
$newfilenameclean = str_replace(" ", "", $newfilename);
require_once ('../../../includes/dbconnect.php');
mysql_query("INSERT INTO files (categoryid, downloadpath, name, author, datetime) VALUES ('$urlid', './downloads/$newfilenameclean', '$filename', '$username', '$datetime2') ") or die(mysql_error());
move_uploaded_file($_FILES["Filedata"]["tmp_name"], "../../../downloads/" . $newfilenameclean);
?>
Now when I upload everything works but the two values that are cookies (urlid and username) are blank although when I visit the upload.php page directly they are entered into the database.
Any one get why this happends
Thanks