tenfoottrike Posted February 10, 2010 Share Posted February 10, 2010 ok this is the error """ Parse error: syntax error, unexpected ';' in /home/jesseco1/public_html/ichangedthename.com/upload_video.php on line 5 """ now i cant find the prob and it's driving me nuts cus the code is stupid simple heres the code <?php if(session_start()){ if($_FILES['file']['name'] != ""){ copy($_FILES['file']['tmp_name'], 'images/a_video/' . $_FILES['file']['name'] or die("Could not copy file"); $id; $item_name = $_POST['item_name']; $date = $_POST['date']; $type = $_POST['type']; $comments = $_POST['comments']; $file = $_FILES['file']['name']; $conn = @mysql_connect("localhost","password","username") or die("Could not connect"); $rs = @mysql_select_db("databasename", $conn) or die("Could not connect to database"); $sql = "insert into ann(id, item_name, date, type, comments, file) values ('', '$item_name', '$date', '$type', '$comments', '$file')"; $rs = mysql_query($sql, $conn) or die("Could not execute query"); mysql_close(); } else{ die("No file specified"); } } else{ header("Location:index.php"); ?> :'( Link to comment https://forums.phpfreaks.com/topic/191690-i-have-a-line-error-and-i-cant-find-what-is-is/ Share on other sites More sharing options...
mikesta707 Posted February 10, 2010 Share Posted February 10, 2010 you forgot to close the copy() function on the following line copy($_FILES['file']['tmp_name'], 'images/a_video/' . $_FILES['file']['name'] or die("Could not copy file"); should be copy($_FILES['file']['tmp_name'], 'images/a_video/' . $_FILES['file']['name']) or die("Could not copy file"); Link to comment https://forums.phpfreaks.com/topic/191690-i-have-a-line-error-and-i-cant-find-what-is-is/#findComment-1010390 Share on other sites More sharing options...
tenfoottrike Posted February 10, 2010 Author Share Posted February 10, 2010 well thank you i dont know what it is with me today but i didnot see that for like a hour of looking ............ i feel dumb now but thank you for your help Link to comment https://forums.phpfreaks.com/topic/191690-i-have-a-line-error-and-i-cant-find-what-is-is/#findComment-1010393 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.