I have created a simple form
<form method="post" action= "loginscript.php">
<p><strong><center>USERNAME:</center></strong><br/>
<center><input type= "text" name="username"/></center></p>
<p><strong><center>PASSWORD:</center></strong><br/>
<center><input type = "text" name= "password"/></center></p>
<p><center><input type= "submit" name = "submit" value="login"/></strong></center></p>
</form>
</body>
</html>
which then goes to a script but I keep getting the following messages:
Warning: mysql_query(): supplied argument is not a valid MySQL-Link resource in *(*(*(*(
Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in *(*(*(*(*
Obviously my query is incorrect so here it is - can anyone give me a clue as to what is wrong?
$sql = "SELECT firstname, surname FROM agent WHERE
username = '".$_POST["username"]. "'AND
password = PASSWORD('".$_POST["password"]."')";
$result = mysql_query($mysql, $sql) or die(mysql_error($mysql));
Thanks