Current location: Hot Scripts Forums » Programming Languages » PHP » blowfish crypt() Login Troubles


blowfish crypt() Login Troubles

Reply
  #1 (permalink)  
Old 12-08-05, 01:37 AM
Ligx Ligx is offline
Newbie Coder
 
Join Date: Nov 2005
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
blowfish crypt() Login Troubles

This is my register script. But i just cant seem to login properly...
PHP Code:

$username = @$HTTP_POST_VARS["username"];

$passUNC = @$HTTP_POST_VARS["password"];
$passENC crypt('$passUNC');

$query "INSERT INTO signup (username, password) VALUES ('$username1','$passENC')";
$result mysql_query($query); 
Take a look... What can possibly be wrong?
PHP Code:

$query "Select * from signup where username='$username1'";

$result mysql_query($query);
if (
$row mysql_fetch_array($result)){

$user_realpass $row["password"];
$user_password = @$HTTP_POST_VARS["password"];
if (
crypt($password$user_realpass) == $user_realpass) {
echo 
"Login Verified!"; } } 
Reply With Quote
  #2 (permalink)  
Old 12-08-05, 07:48 AM
ben.periton ben.periton is offline
Wannabe Coder
 
Join Date: Oct 2004
Posts: 183
Thanks: 0
Thanked 0 Times in 0 Posts
Should $passENC = crypt('$passUNC'); not be $passENC = crypt($passUNC);
without the quotes?
__________________
Ben Periton
http://ben.periton.co.uk
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Login Script problem Justin171985 Script Requests 0 07-02-05 12:10 AM
PHP Valid Login Checking phppick PHP 3 04-25-05 05:23 PM
Login script troubles glittercast PHP 1 02-28-05 08:35 PM
Combine Multiple Login Scripts fernandose PHP 2 02-04-05 04:09 PM
HELP! Php to login to HTACCESS? godfather PHP 4 03-06-04 12:03 AM


All times are GMT -5. The time now is 06:22 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.