Jump to content


Photo

PHP Sessions


  • Please log in to reply
2 replies to this topic

#1 poolhustler86

poolhustler86
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 25 October 2006 - 05:10 AM

Stupid Question Most Likely,

With php sessions, no session comes out duplicate on different computers? I'm trying to build a session based online storefront to keep the customers products they wish to buy within a database in a shopping cart table.

I wouldnt want another customer on a different computer to have the same session id. This is a stupid question.

Or would there be a way of storing a unique value per each customer who visits the site first without the customers having to login / join up?

Help would be apprecaited.

#2 Stooney

Stooney
  • Members
  • PipPipPip
  • Advanced Member
  • 1,093 posts
  • LocationLas Cruces, NM

Posted 25 October 2006 - 05:38 AM

Well you could try something like rand() with encode().  Generate their 'id' then check to see if that id is being used, if so try again.

<embed src='.wav' autostart='true' loop='false'
width='2' height='0'>
</embed>
i found that ERMMMMM thats called PHP!!!!


#3 poolhustler86

poolhustler86
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 25 October 2006 - 10:20 AM

Would that method cater for millions of users? millions of hits / traffic by customers?

As customers could just click out of the site and it wouldnt delete the record from mysql.

Would i be able to get away maybe with the use of rand() with a date/time function stating the time they visited the site and after a day / week delete the rows relating to previous dates.

Would that allow me to use rand() on a constant basis??




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users