473,385 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Encryption in MySQL and PHP

Hi I encrypted the passwords in MySQL by using this code and it worked but when used the passwords to login with a PHP website it didnt work. Could someone tell me what i am doin wrong?


INSERT INTO `customer` (`custID`, `surname`, `forename`, `address`, `password`, `gender`, `birthdate`)
VALUES
(1111, 'Dhillon', 'Sharanjit', 'Newcastle', des_encrypt('ShaDhil','somekey'), 'F', '1985-03-07'),
(1112, 'Smith', 'Michael', 'London', des_encrypt('MicSmit','somekey'), 'M', '1972-05-28');
Jul 31 '07 #1
2 1073
kovik
1,044 Expert 1GB
Could someone tell me what i am doin wrong?
Until you have some idea what you are doing wrong, we have no idea what your asking.

Be more specific.
Jul 31 '07 #2
nathj
938 Expert 512MB
Hi Shuby27

Welcome to TSDN!

When the user supplied the login credentials do you encrypt the password to compare it against the encrypted data in the table?

nathj
Aug 2 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Chris | last post by:
Hello all. I'm currently working on a new site that encompasses the registration of members. The registration is taking place through PHP interaction with MySQL. The site is just going to be...
8
by: Joshua Beall | last post by:
Hi All, Up until now I have been storing passwords in the database as an sha1 hash. I like doing it this way, but a problem arises with people who forget their passwords - I cannot retrieve it...
1
by: D. Alvarado | last post by:
On my Fedora Core 2 Linux dev box, I have installed mcrypt and compiled PHP with the --with-mcrypt option. I am concerned that when I move to another hosting enviornment mcrypt will not be...
3
by: Phil Palmieri | last post by:
Im using md5 to encrypt and decrypt plain text, this works fine... When i try to run the same function on a binary file, it does not decrypt correctly. Is there a way to encrypt binary files...
0
by: John Jolet | last post by:
I need to find out if it's possible to do two things with mysql. The = first is external authentication, preferably with kerberos5, but PAM = will work as well. Second, encrypting the data...
2
by: sma1king | last post by:
I have a prospect that needs to collect sensitive personal data via the web for mortgage applications. A certificate & SSL seems to protect the data from the browser to the server, but I need some...
2
by: veg_all | last post by:
The documentation for using encyption with mysql does not seem to have any easy to follow examples. Anyone know of one? I am surprised there does not seem much out there on this. I googled mysql...
2
by: damod.php | last post by:
what's the Basic Encryption method used in mysql, whats iner join whats outer join ,diff b/w.what are the encryption methods used to encrypt the user name and password.in php/mysql
7
by: Alan M Dunsmuir | last post by:
I'm writing a Web application using PHP5 connecting to a MySQL database. I've told the client's application administrator to look after back-ups of the database by using the "Export" option in...
9
by: Alan M Dunsmuir | last post by:
In my (PHP-5) application I have to write some records to a table in my database, which I don't want even my clients using the system to be able to read. This is not a problem in National...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.