Hey guys I am trying to create a login that checks for a password in a mysql database. I have just started picking away at this and have no clue if I am even close. If I am not even close I don't need someone to wast there time holding my hand through this just tell me and I will read up more just wondering if its something small or if I am going the totally wrong direction.
<?php
include = '/var/www/sql_connect.php';
$user = '$_POST['password'];
//if (mysql_query ("SELECT * FROM users WHERE pass = '$user'"){
//header ("location: administration.php");
//} else {
//header ("location: index.php");
//}
$result = mysql_query ("SELECT * FROM users WHERE pass = '$user'") or die(mysql_error());
if ($_POST['password'] == '$result'{
header ("location: administration.php");
} else {
header ("location: index.php");
}
?>
Thanks!
-Justin