Why not use php's sessions, where php uses cookies for getting phpsessid,
and if no cookies are available, it automatically adds those id's to every
href (you can manage that in php's conf file)

Jon Feldhammer <[EMAIL PROTECTED]> wrote in message
> The way I see it, there are three options for maintaining state in php.
> I've already taken the route of keeping a random session id and putting it
> into a database to track a user/cart.  So the only variable i need to
> is the session id.  The three options I know of then are:
> 1. Putting the session id in the url
> 2. Putting the session id into a cookie
> 3. Putting the session id into a hidden input type and have every button
> a form
> Option 3 sucks asthetically and coding wise.  Option 1 is somewhat ugly
> because now you have a big ole session id in your url (plus I don't think
> search engines like these).  Also, with option 1 you need to have a <?php
> echo "?session_id=$session_id" ?> type line in every href which is a pain
> the ass.  Option 2 is great, if the user uses cookies, if not, you cannot
> track the user at all.  Anyone have the perfect solution?
> Thanks.
> Jon

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to