Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP/SQL
#10
I'ts not working

http://virtualscope.x10.mx/Account/cookie.php

Source:
Code:
<?php
include("../api.php");
@ $con=mysql_connect("*", "*", "*");
if (!$con)
{
sError(mysql_error());
}

$result = mysql_query("SELECT * FROM User WHERE Username = '".mysql_real_escape_string($_POST['user'])."' AND Password = '".hash('sha256',$_POST['psw'])."'");

if (mysql_num_rows($result)) {
setcookie("user", $_REQUEST['user']);
} else {
sError("Incorrect username/password");
}
?>
Reply


Messages In This Thread
PHP/SQL - by Dignity - 08-12-2011, 09:19 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)