note 96294 added to function.crypt

From: Date: Fri, 19 Feb 2010 06:11:01 +0000
Subject: note 96294 added to function.crypt
Groups: php.notes 
Request: Send a blank email to php-notes+get-166167@lists.php.net to get a copy of this message
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(); ---- Server IP: 69.147.83.197 Probable Submitter: 128.143.117.83 ---- Manual Page -- http://www.php.net/manual/en/function.crypt.php Edit -- https://master.php.net/note/edit/96294 Del: integrated -- https://master.php.net/note/delete/96294/integrated Del: useless -- https://master.php.net/note/delete/96294/useless Del: bad code -- https://master.php.net/note/delete/96294/bad+code Del: spam -- https://master.php.net/note/delete/96294/spam Del: non-english -- https://master.php.net/note/delete/96294/non-english Del: in docs -- https://master.php.net/note/delete/96294/in+docs Del: other reasons-- https://master.php.net/note/delete/96294 Reject -- https://master.php.net/note/reject/96294 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#166167) next »