Registering a username and session-ing it!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Klaws_wolverine
Forum Commoner
Posts: 32
Joined: Mon Sep 29, 2003 10:11 am

Registering a username and session-ing it!

Post by Klaws_wolverine »

Hello all,

If I would like to have a consumer services section wherein the user would register a username and password, and that person gets registered into the database, and a cookie goes into their computer to remember their username and password, also a sessionID to drag that username accross pages within the site.

How hard would this be to implement and how long do you think it would take?

The reason I want to do this is if someone registers a product, in the DB he/she has their own custID, if on another they register another toy, rather than having another custID, keep the same one.

Is this a good way for them to have the same custID, or is there another way for me to do this?

Thanks
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

Thats probably the best way to do it, either that or use sessions instead of cookies. There are many tutorials and scripts on the internet about user login systems.

http://www.phpfreaks.com/tutorials/40/0.php
http://www.spoono.com/php/tutorials/tutorial.php?id=34
http://www.hotscripts.com/PHP/Tips_and_ ... ntication/
http://www.pscode.com/vb/scripts/ShowCo ... 0&lngWId=8
Klaws_wolverine
Forum Commoner
Posts: 32
Joined: Mon Sep 29, 2003 10:11 am

Sessions

Post by Klaws_wolverine »

Excellent, however my backend would be SQL Server.

One question however, if I have already an access database with many entries, but no custID, username of password, and also many mail-in warranties, how would I fix that? I want every user to have their own custID without one day having two of them.

So with that in mind, what would I do with the access database, and also we still have many mail-in warranties many without email addresses.

Also to keep in mind is that we will continue to receive mail-in warranties, so they wouldn't get a username and password.

I would appreciate any help or advice that anyone would be so kind to give.

Thanks
Post Reply