Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another cookie post 1

Status
Not open for further replies.

strantheman

Programmer
Mar 12, 2001
333
US
I have a lot of experience in Cold Fusion, but 0 php experience. My needs are simple, and I really hope someone out there can help me.

I do not want to use session variables, I want to use cookies. This is an intranet application.

Here's what i'd like to do:
1) <a href=&quot;save.php?udTrack=3&quot;>Track 3</a> If the user clicks this link, the variable udTrack will be passed to save.php.
2) Set a cookie named TRACK = udTrack which was passed in the URL string.
3) Read the cookie TRACK on any other php page on my web site.

This will give me a starting point at least, and would be extremely helpful in my education of PHP.

thanks in advance for your time

strantheman
 
Why do you not want to use session variables? All PHP will do is set one cookie on the client web client, and you can have a host of variables available to all successive pages.

But URL input will be available in the superglobal array $_GET (
To set a cookie, use set_cookie() (
Want the best answers? Ask the best questions: TANSTAAFL!!
 
Hi sleip thx for reply

I think everythings working :) Thanks ill let you know if i get stuck.

strantheman

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top