Jump to content

i have a line error and i cant find what is is !!!!!!


tenfoottrike

Recommended Posts

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");
?>

:'(

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");

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.