Upload problem

Tags:    php

Jeg har denne add.php som skulle virke men noget er galt for når jeg uploader den er siden tom please help me.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<?php

//This is the directory where images will be saved
$target = "billeder/";
$target = $target . basename( $_FILES['photo']['name']

//This gets all the other information from the form
$name=$_POST['name'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$pic=($_FILES['photo']['name']);

// Connects to your Database
mysql_connect("**********", "*******", "******") or die(mysql_error());
mysql_select_db("*********") or die(mysql_error());

//Writes the information to the database
mysql_query("INSERT INTO employees VALUES ('$name', '$email', '$phone', '$pic')");

//Writes the photo to the server
if(move_uploaded_file($_FILES['photo']['tmp_name'], $target))
{

//Tells you if its all ok
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded, and your information has been added to the directory";
}
else {

//Gives and error if its not
echo "Sorry, there was a problem uploading your file.";
}
?>
<form enctype="multipart/form-data" action="add.php" method="POST">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name = "email"><br>
Phone: <input type="text" name = "phone"><br>
Photo: <input type="file" name="photo"><br>
<input type="submit" value="Add">
</form>

</body>
</html>



1 svar postet i denne tråd vises herunder
1 indlæg har modtaget i alt 2 karma
Sorter efter stemmer Sorter efter dato
Parse error: parse error, unexpected T_VARIABLE in test.php on line 16

Fold kodeboks ind/udKode 


rettet:
Fold kodeboks ind/udKode 



Slå error_reporting til:
Fold kodeboks ind/udKode 

Sættes i toppen på en side.



t