When I run my script it seems to generate the following error:
parse error, expecting T_STRING' orT_VARIABLE' or `T_NUM_STRING'
this is my script: - can anybody PLEASE help? urgent!!
<?php
//Bannersigs Uploader//
//By WTH//
session_register("username","password");
$session=session_id();
mysql_connect("localhost","username","pword");
mysql_select_db("dbname");
$query = "SELECT username, password FROM bannersigs_users";
$result = mysql_query($query);
while ( $row = mysql_fetch_array($result)) {
if ($row[username]==$username && $row[password]==$password) {
$dirname = "$row[username]";
define(PATH, "/usr/home/beerbad/public_html/bannersigs/users/");
$filename = $myfile_name;
if ($filename != "")
{
copy($myfile, PATH.$dirname."/".$filename);
$fileaddy = "http://beer-bad.net/bannersigs/$row[username]/$filename";
// delete the temporary uploaded file
unlink($myfile);
// tell them it worked
echo "<body text=#000000 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgProperties=fixed background=../../images/middle-back.jpg>
<table width=470 border=0 cellspacing=0 cellpadding=0 height=380>
<tr>
<td valign=top>
<div align=center>
<p><b><font face=Verdana, Arial, Helvetica, sans-serif size=1 color=#FFFFFF>File uploaded successfully.<br><br>
<center><img src=$fileaddy><br>
</center></font></p>
</div>
</td>
</tr>
</table>
</body>";
$insert-get = "INSERT INTO bannersigs_$type (username,$type_filename) VALUES ('$username','$filename')";
$insert = mysql_query($insert-get);
}
else
{
// tell them to browse for a file
echo "<body text=#000000 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 bgProperties=fixed background=../../images/middle-back.jpg>
<table width=470 border=0 cellspacing=0 cellpadding=0 height=380>
<tr>
<td valign=top>
<div align=center>
<p><b><font face=Verdana, Arial, Helvetica, sans-serif size=1 color=#FFFFFF>You must select a file to upload OR username/password was incorrect!<br><center><a href=\"http://beer-bad.net/banners/myhome/myftp/index.php\" class=\"main\">Back</a> | <a href=\"http://beer-bad.net/banners/users/login.php\" class=\"main\">Login</a> | <a href=\"http://beer-bad.net/banners/users/signup.php\" class=\"main\">Register an account</a></font></p>
</div>
</td>
</tr>
</table>
</body>";
}
}
}
?>
PLEASE PLEASE SOMEBODY HELP ME! 🙁