clodhoppers18
Programmer
I am getting this error:
to report to this PHP script:
I am trying to have this upload a file to the web space, and report details to a MySQL database.
I cannot figure out why on line 37 it says "unexpected T_LOGICAL_OR" error. I have moved things around and I still get this error. PLEASE HELP.
Many Thanks in Advance,
Dustin
I am using this HTML form:Parse error: syntax error, unexpected T_LOGICAL_OR in /mounted-storage/home50a/sub005/sc34114-DSXR/fsfilelib.info/uploader.php on line 37
Code:
<form action="uploader.php" method="post" enctype="multipart/form-data">
<div align="left">
<h4><span class="style10"><strong>Name of File </strong>
<input type="text" name="name" size="42"/>
<br />
<br />
<strong>Type</strong>
<select name="type">
<option value="none">------</option>
<option value="Aircraft">Aircraft</option>
<option value="Scenery">Scenery</option>
<option value="Sound">Sound</option>
<option value="Utilities">Utilities</option>
<option value="AI">AI Stuff</option>
<option value="Panels">Panels</option>
<option value="ATC">ATC Utilities</option>
<option value="Demos">Demos</option>
<option value="Other">Other</option>
</select>
<br />
<br />
<strong>Description:</strong><br />
<textarea name="desc" cols="54" rows="4">Enter Long Description Here</textarea>
<br />
<br />
<strong>File:</strong><br />
<input type="file" name="file" size="45"/><br />
</span>
<input type="reset" name="Submit2" value="Reset" />
<span class="style10">
<input type="submit" name="Submit" value="Submit" />
</span></h4>
</div>
</form>
Code:
<?PHP
define("legitrequest", 1);
# setting.php contain MySQL database setting and other setting it contain also the FSP UNIT SETTING
require ("connect/setting.php");
# common.php do the connexion to MySQL the value $databaseconnexion is set to true if the connexion is okay
require ("connect/common.php");
// the value "$databaseconnexion" is set to true in common.php if the connexion is ok
if ($databaseconnexion == false)
{
echo "Error - unable to connect to mySQL database;";
return;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
$type = stripslashes($POST['type']);
$name = stripslashes($POST['name']);
$desc = stripslashes($POST['desc']);
$loc = "uploads/$type/{$_FILES['upload'] ['name']}";
if ($_FILES['file']['name'] != "")
{
if (move_uploaded_file($_FILES['upload']['tmp_name'], "uploads/$type/{$_FILES['upload'] ['name']}"))
{
if ($uploaded_size > 3500000)
{
die "Your file is too large.<br>";
$ok = 0;
}
else
{
$sql = "INSERT INTO `filelist` (id,datestamp,type,name,desc,filetype,location) VALUES ('',now(),$type,$name,$desc,$filetype,$loc);";
$sql_update = @mysql_query($sql);
echo '<p>Your File was uploaded successful, please allow up to 48 hours for your download to be processed.</p>';
}
}
else
{
die ("Could Not Copy File");
}
}
else
{
die ("No File Specified");
}
?>
I cannot figure out why on line 37 it says "unexpected T_LOGICAL_OR" error. I have moved things around and I still get this error. PLEASE HELP.
Many Thanks in Advance,
Dustin