note 96294 deleted from function.crypt by danbrown
| From: | danbrown@php.net | Date: | Fri, 19 Feb 2010 17:21:45 +0000 |
| Subject: | note 96294 deleted from function.crypt by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-166187@lists.php.net to get a copy of this message | ||
Note Submitter: Brian_bot
----
Here is my login script. I don't know what I'm doing wrong here. Can anyone see if
I'm using my crypt() function correctly?
SQL="SELECT password AND subscr_id FROM paypal_subscription_info WHERE username = '"
.$_POST[login] . "'";
$result = mysql_query($SQL);
while($row = mysql_fetch_array($result))
$encrypted_password = $row['password'];
$pass = crypt($_POST['password']);
//Check whether the query was successful or not
if($result) {
if($pass == $encyrpted_password) {
//Login Successful
session_regenerate_id();
$member = mysql_fetch_assoc($result);
$_SESSION['SESS_SUBSCR_ID'] = $member['subscr_id'];
session_write_close();
header("location: index.php");
exit();