This script simply parses a 3 part form. When I run it, I recieve a Parse error stating that line 42 contains the error. This is what I have so far, and line 42 is the line with the $Result1 declaration. Does anyone know what is wrong here?
I am a newbie and this is my first attempt using a mysql database- this is really frustrating me because I know it is probably something very simple.
####################################################
Set Variables to connect to the MYSQL Database.
####################################################
include ("../ACCESS/tr129.inc");
$TableName1 = "auth";
################################################
Find out if the username is already in use
################################################
$Link1 = mysql_connect($Host, $User, $Password);
mysql_select_db($DBName, $Link1);
$Query1 = "SELECT* from $TableName1 where user = '$user'"
error is here>>$Result1 = mysql_query($Query1, $Link1);
$Array1 = mysql_fetch_array($Result1);
if ($Array1["user"] == $user) {
print ("<center><b><font size ='6' color ='red'>THE USERNAME THAT YOU HAVE CHOOSEN IS ALREADY IN USE, PLEASE USE YOUR BROWSERS BACK BUTTON AND CHOOSE ANOTHER USER/CHARACTERNAME </center></b></font>");
exit;
}
#######################################################################################
Connect to the Database using the above variables if the above is not a duplicate.
#######################################################################################
$Link2 = mysql_connect($Host, $User, $Password);
mysql_select_db($DBName,$Link2);
#########################################
##Now place the data into the DataBase.##
#########################################
$Query2 = "INSERT into $TableName1 values ('0','$user','$pass','3','0','0','0','0','0','0','0')";