Topic: How to pass a "CODE" around Pages

Hi all,

   I need to send a code for reference through the browser session, how can i do that?
   code is nothing but a string. in othe words id number

Example:
    If someone cliks "my web link" from someother website(referring mysite) I ll get a code from that site say "...com/index.php?action=main&code=XYZ123" I want the code to be carried in all the pages. If that person registers with my site, i ll avail discount to that person, if not i should not.

I want to store the code and retriew whenever i want. Is there any smart way to do it.

Thanks in ADv.

God wisely designed the human body so that we can neither pat our own backs nor kick ourselves too easily

Re: How to pass a "CODE" around Pages

Using sessions? http://uk2.php.net/manual/en/function.session-start.php

Re: How to pass a "CODE" around Pages

Thanks, but, is it possible to do without sessions... we need to store the user id in server right? is there any other method left?

God wisely designed the human body so that we can neither pat our own backs nor kick ourselves too easily

Re: How to pass a "CODE" around Pages

Huh?
Well you can use cookies or put data in the url on every link, but thats all sessions do, use cookies or put a session id in the url.

Re: How to pass a "CODE" around Pages

In 1.3, it will be very simple since all links are "generated" by a function. You would just append your code in that function.

"Programming is like sex: one mistake and you have to support it for the rest of your life."