Hi guys, i need some help here with my php code. Im trying to make a login and regestration site, havn't gotten very far though. I tried to fix the problem on my own, by reading alot about it, but still it gives me this error.
im getting a "Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\afsluttende projekt\test.php on line 5"
and heres my code:
PHP Code:
<?php
$username = $_POST ['username']
$link = mysql_connect ('localhost','root',''); //this is line 5
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
$db = mysql_select_db ('phplogin');
if (!$db) {
die('Could not find database: ' . mysql_error());
}
$query = mysql_query ("SELECT * FROM phplogin WHERE username = {$_POST ['username']}", $link) or die (mysql_error());
mysql_query($query);
$num_row = mysql_num_rows ($query);
echo ($num_row);
?>
Im just trying to make it spit out a username and password for now, one step at the time right :p
ty in advanced