uploadify and sql query

MichaelS

New Member
i am using uploadify script to upload files as my school project.\[code\]//die($_SESSION['ID'].'.....'.$_SESSION['level']);if (!empty($_FILES)) { $tempFile = $_FILES['Filedata']['tmp_name']; $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/'; $filename = substr(md5(time()), 0, 8)."-".$_FILES['Filedata']['name']; $targetFile = str_replace('//','/',$targetPath) . $filename; $time = time(); $ID = $_SESSION['ID']; $sql = mysql_query("INSERT INTO files VALUES(NULL, '$ID', '$targetFile', '$time')"); move_uploaded_file($tempFile,$targetFile); echo "1";}\[/code\]On top $_SESSION['id'] is working, however when i entered inside $sql, it return as 0. Any idea why? i have rechecked everything. Confused. Thank you
 
Back
Top