Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2003
Posts: 6
Lurker
Lurker
Offline
Joined: Apr 2003
Posts: 6
I have a simple PHP login script that checks username and password in a table called 'user' in a database called 'secret'.

The PHP script is checking as such:
$db = mysql_connect("localhost", "myuser", "mypassword");
mysql_select_db("secret")
SELECT id from user WHERE username = '$user' AND password = MD5('$pass');

$user and $pass are simply the value from the login. THe above SQL query is presenting a empty set for #user and $pass, but does return the id.

So my questions is, how do I add a MD5 password to the password field ( $pass ) for the $user ?

I've tried: SELECT MD5('mypasswordhere'); and this does spit out a MD5 encrypted password for 'mypasswordhere' but how do I get it in the password field?

michael

Sponsored Links
Entire Thread
Subject Posted By Posted
MySQL encrypted passwd that PHP can see viporx 04/19/2003 8:59 PM
Re: MySQL encrypted passwd that PHP can see Dave_L_dup1 04/19/2003 9:12 PM
Re: MySQL encrypted passwd that PHP can see viporx 04/19/2003 10:03 PM
Re: MySQL encrypted passwd that PHP can see Dave_L_dup1 04/19/2003 10:23 PM
Re: MySQL encrypted passwd that PHP can see dimopoulos 04/21/2003 7:19 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)