If you just echo $userid you will get the results.

do this
setcookie ("cookie_variable", "chocalate chip", 1, "", "", 1);

echo $cookie_variable

You can name the cookie_variable whatever you want and that will be referenced
as the variable to store "chocalate chip".
Now if you want to see the value from within a function you will need to also do
this:

 global $HTTP_COOKIE_VARS;

this will enable you to see the values stored in the cookies.

Andrew Rose wrote:

> Ive been playing with setcookie() and am stuck with trying to re-pull the
> infomation I set,  I use:
>
>  setcookie ("user_id", $userid, 1, "", "", 1);
>
>  to set the cookie and:
>
> if(isset( $user_id )){
>  echo " cookie 'user_id': $user_id\n";
> } else
>
>  echo" no cookie set ...\n";
> }
>
> to see if its there.. now this is the closest Ive seen anyone else do it and
> to me it dosnt make much sense at all the code for retrieving.. also it
> dosnt work.. suprise suprise.. so anyone know how to do this?
>
> thanks in advance
>
> -Andrew Rose
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

--
___________________________________________________________
Jack Sasportas
Innovative Internet Solutions
Phone 305.665.2500
Fax 305.665.2551
www.innovativeinternet.com
www.web56.net



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to