Can someone please tell me why this script is not working, I keep getting this as a response when I publish it:
Parse error: syntax error, unexpected T_VARIABLE in /home/blywjso/public_html/trial.php on line 100
Also where the line says: $con=mysql_connect('ftp address','masterusername','masterpassword');
Can you confirm whether I the above to connect to the mysql please? or whether I need to use something else.
94 <?php session_start();?>
95 <html>
96 <head />
97 <body>
98
99 <form action='index.php?login=yes' method=POST>
100 <username:<input type=text name'username'><br/>
101 <password:<input type=password name'password'><br/>
102 <input type=submit value='Submit!'>
103 </form>
104 <?php
$username$_POST['username'];
$password$_POST['password'];
$login$_GET['login'];
if($login=='yes'){
$con=mysql_connect('_________','________','_______ _');
mysql_select_db(blywjso_ABVFP);
$get=mysql_query("SELECT count(id) FROM _Form_Nr_2 WHERE username='$username' and password='$password');
$result=mysql_result($get, 0);
mysql_close($con);
if ($result!=1)echo 'Login Attempt Failed!';
else
{echo"login success!";
$_SESSION['username']=$username;
};
};
?>
</body>
</html>
Parse error: syntax error, unexpected T_VARIABLE in /home/blywjso/public_html/trial.php on line 100
Also where the line says: $con=mysql_connect('ftp address','masterusername','masterpassword');
Can you confirm whether I the above to connect to the mysql please? or whether I need to use something else.
94 <?php session_start();?>
95 <html>
96 <head />
97 <body>
98
99 <form action='index.php?login=yes' method=POST>
100 <username:<input type=text name'username'><br/>
101 <password:<input type=password name'password'><br/>
102 <input type=submit value='Submit!'>
103 </form>
104 <?php
$username$_POST['username'];
$password$_POST['password'];
$login$_GET['login'];
if($login=='yes'){
$con=mysql_connect('_________','________','_______ _');
mysql_select_db(blywjso_ABVFP);
$get=mysql_query("SELECT count(id) FROM _Form_Nr_2 WHERE username='$username' and password='$password');
$result=mysql_result($get, 0);
mysql_close($con);
if ($result!=1)echo 'Login Attempt Failed!';
else
{echo"login success!";
$_SESSION['username']=$username;
};
};
?>
</body>
</html>
Comment