Jump to content

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


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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.