Jump to content

Archived

This topic is now archived and is closed to further replies.

alexville

[SOLVED] Making a PHP Login page with a MySQL database

Recommended Posts

Ok, I already have a way for people to register (insert data) into the database. But I wish to create a PHP login script. I'm completly lost with this part and I am hopeing you guys arnt. :-D

Here is my database setup:
[code]SQL result

Host: localhost
Database: alexg_web
Generation Time: Feb 16, 2006 at 06:44 PM
Generated by: phpMyAdmin 2.6.4-pl2 / MySQL 4.1.14-standard
SQL query: SELECT * FROM `Citizens` LIMIT 0, 30;
Rows: 1
id     Firstname     Lastname     Username     Password     Email     Invision
1     Austin     Grenier     AustinRocks     carcar     austin@austin.com     on
[/code]

If someone could help that would be great!

Share this post


Link to post
Share on other sites
Are you familiar with the concept of session handling? If no, that's what you need to investigate.

If yes, what about logging in has you hung up?

Share this post


Link to post
Share on other sites
What's wrong with "SELECT * FROM citizens WHERE username='$user' and password='$pass'" and checking to see if anything matches?

Share this post


Link to post
Share on other sites
PHP is not my forte -- I'm sure someone else can give you some psuedo-code or recommend a good tutorial. Good luck.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.