General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 18th, 2003, 09:40 AM
jov17 jov17 is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: San Antonio
Posts: 1 jov17 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to jov17
Need Help saving sessions!

Hello,

I'll pose my question as simply as possible, as I do respect your time.

I have a user login form on my site. I need to save the session id to my database when a user registers for a username and password. I need this because in a different table I will store book information that corresponds to the same session id that exists in the "users" table.

Basically, I need to know how to save the session ID upon user registration & how to call it when they login, so that I can show the user the books they've posted when they login.

A good example of this can be found on my site at URL

This site was programmed with Lasso, and I'm trying to reprogram it with PHP.

To make things more clear.

Also

Yes,

Sorry for being unclear..

I need to send the session ID of the newley registered user to mysql database, then, when they login at a different date and time, I need to pull the same session ID that was entered with the registration information (username, pass ect...)

If you're wandering why, it's because when the user logs in, they will be able to post text-book info. This text-book info will be related to their session ID which will also be the same session ID as the one in the "users" table.

Example:

Database "bookstorebandits:

Table "users":
Session ID,
Username,
Password,
First Name,
Last Name,
Email,


Table "books:
Session ID,
Date,
Title,
Author,
ISBN,
Price,


Here's my current website biult using .lasso, I'm trying to biuld my own using .php. So I need to learn how to do what my programmer did to make my site.

Thanks for any input that you have ...it is very appreciated.



James


Thanks in advance!

Reply With Quote
  #2  
Old August 18th, 2003, 09:51 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Look up session_set_save_handler at php.net and within the tutorials here and at other sites like Zend. This allows you to override the default session handler and log sessions to a database. You'll have to write a little class to handle the session handling, but it shouldn't be too hard to find one of those already out there (I did at one point, but I don't remember where I found it). This'll allow you to have mysql handle sessions (arguably safer than having them stored in /tmp anyway) and to validate session ids against user accounts, etc.

Reply With Quote
  #3  
Old August 18th, 2003, 09:01 PM
jpenn jpenn is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Washington, DC
Posts: 317 jpenn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 m 3 sec
Reputation Power: 7
__________________
~ Joe Penn

We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set?

Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you.




Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > Need Help saving sessions!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT