EDIT: I forgot to add semi colons. Now there is another problems. I'm getting a error:
Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\useraccess.php on line 12
It outputs:
0){ echo 'si'; } ?>
When it should only output 'si' in the body.
Here's the code:
<html>
<head>
</head>
<body>
<?
$user = mysql_real_escape_string($_GET["u"])
$pass = mysql_real_escape_string($_GET["p"])
$query = "SELECT * FROM usario WHERE username = '$user' AND password = '$pass'"
mysql_connect(localhost, "sergio", "123");
@mysql_select_db("multas") or die( "Unable to select database");
$result=mysql_query($query);
if(mysql_numrows($result) > 0){
echo 'si';
}
?>
</body>
</html>