$user=$email

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hello,
i am trying to do the following:
case "login": $connection = mysql_connect($host, $user,$password) //15 or die ("Couldn't connect to server.");
$db = mysql_select_db($database, $connection)
or die ("Couldn't select database.");

$sql = "SELECT email FROM accounts WHERE email='$email'";
$result = mysql_query($sql)
or die("Couldn't execute query.");
$num = mysql_num_rows($result); if ($num == 1) // login name was found //25 {
$sql = "SELECT email FROM accounts WHERE email='$email'
AND password=password('$password')";
$result2 = mysql_query($sql)
or die("Couldn't execute query.");
$num2 = mysql_num_rows($result2);
if ($num2 > 0) // password is correct {
$auth="yes"; //35 $user=$email; $today = date("Y-m-d h:m:s"); $sql = "INSERT INTO login (loginName,loginTime)
VALUES ('$email','$today')";
mysql_query($sql) or die("Can't execute query.");
header("Location: cat_ad.php"); }
else // password is not correct {

in my config.php file which is a required file i have $user=$email, etc.
i continually receive an access denied/couldn't connect to server. i'm sure i'm leaving something out...
thank you for your time. addison
--
Addison Ellis
small independent publishing co.
114 B 29th Avenue North
Nashville, TN 37203
(615) 321-1791
addison@bellsouth.net
info@smipco.com
subsidiaries of small independent publishing co.
info@gloabaldog.com
info@momandpocentral.com

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux