w32 Posted July 29, 2006 Share Posted July 29, 2006 So I have a cookie set, and I named it with a dynamic value. And I do not know how to retrieve its value.so lets say I have a varialble, like $val1 how can I retrieve the cookie? $_COOKIE['$val1']; ??Can you please tell he how can it be done, if it can?Thanks. Quote Link to comment Share on other sites More sharing options...
pixy Posted July 30, 2006 Share Posted July 30, 2006 <?phpecho $_COOKIE['val1'];?> Quote Link to comment Share on other sites More sharing options...
w32 Posted July 30, 2006 Author Share Posted July 30, 2006 thanks for your reply :Dthough it didn't work for me :( is that how its done?I will keep trying, however. :) Quote Link to comment Share on other sites More sharing options...
pixy Posted July 30, 2006 Share Posted July 30, 2006 Did you get an error or something? I personally use sessions on my site and that's the same syntax that works for me. Quote Link to comment Share on other sites More sharing options...
w32 Posted July 30, 2006 Author Share Posted July 30, 2006 the result I was trying to echo didn't show up, when it was like this:<?phpecho $_COOKIE['val1'];?>however this worked:<?phpecho $_COOKIE[val1];?>thanks btw :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.