alright so i am doing a login form and when i go to preview it there are no errors but when i hit login i get errors. the errors look like this:
Notice: Use of undefined constant username - assumed 'username' in C:\wamp\www\register
improved02\login.php on line 6
Notice: Use of undefined constant password - assumed 'password' in C:\wamp\www\register improved02\login.php on line 6
and this my code so far:
<?php
$username = @$_POST['username'];
$password = @$_POST['password'];
if (username&&password)
{
$connect = mysql_connect("localhost","root","") or die("couldn't connect!");
mysql_select_db("phplogin") or die("couldn't find db");
}
?>
Notice: Use of undefined constant username - assumed 'username' in C:\wamp\www\register
improved02\login.php on line 6
Notice: Use of undefined constant password - assumed 'password' in C:\wamp\www\register improved02\login.php on line 6
and this my code so far:
<?php
$username = @$_POST['username'];
$password = @$_POST['password'];
if (username&&password)
{
$connect = mysql_connect("localhost","root","") or die("couldn't connect!");
mysql_select_db("phplogin") or die("couldn't find db");
}
?>