Locals Find!
New Member
Can anyone help me I keep getting the following error in my php upload script when I run it.
Parse error: syntax error, unexpected T_VARIABLE in D:\hosting\6439177\html\testbed\upload.php on line 8
Here is a copy of the code
<html>
<head>
</head>
<body>
<?php
mysql_connect("removed", "removed", "removed") or die(mysql_error());
mysql_select_db("removed")
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO uploads (description, data,filename,filesize,filetype) ". "VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");
$id= mysql_insert_id();
print "<p>File ID: <b>$id</b><br>";
print "<p>File Name: <b>$form_data_name</b><br>";
print "<p>File Size: <b>$form_data_size</b><br>";
print "<p>File Type: <b>$form_data_type</b><p>";
print "To upload another file <a href=http://www.removed> Click Here</a>";
?>
</body>
</html>
Parse error: syntax error, unexpected T_VARIABLE in D:\hosting\6439177\html\testbed\upload.php on line 8
Here is a copy of the code
<html>
<head>
</head>
<body>
<?php
mysql_connect("removed", "removed", "removed") or die(mysql_error());
mysql_select_db("removed")
$data = addslashes(fread(fopen($form_data, "r"), filesize($form_data)));
$result=MYSQL_QUERY("INSERT INTO uploads (description, data,filename,filesize,filetype) ". "VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')");
$id= mysql_insert_id();
print "<p>File ID: <b>$id</b><br>";
print "<p>File Name: <b>$form_data_name</b><br>";
print "<p>File Size: <b>$form_data_size</b><br>";
print "<p>File Type: <b>$form_data_type</b><p>";
print "To upload another file <a href=http://www.removed> Click Here</a>";
?>
</body>
</html>