michel wrote:[color=blue]
> A simple problem that requires a simple solution and I should be able and
> read php.net.... but can someone please help me out for a sec?[/color]
http://www.php.net/setcookie
<quote>
bool setcookie ( string name [, string value [, int expire [, string
path [, string domain [, int secure]]]]])
</quote>
[color=blue]
> I need to store a cookie and read it from a different path.
>
> using:
>
> setcookie('pros','$data','/');[/color]
You are missing the expire parameter
setcookie('pros', '$data', $missing_expire_parameter, '/');
Oh, and one more thing:
Are you sure the string to set the cookie to is '$data'?
That is five characters long starting with a literal dollar sign!
[color=blue]
> to be able to read it from wherever on the same domain.
> What's wrong now. I get this:
>
> Warning: setcookie() expects parameter 3 to be long, string given in
> e:\phpdev\www\public\prospects\logon\index.php on line 38[/color]
What a nice and *very descriptive* error message!
Much better than, for example, "Syntax error near line 38"
--
USENET would be a better place if everybody read: : mail address :
http://www.catb.org/~esr/faqs/smart-questions.html : is valid for :
http://www.netmeister.org/news/learn2quote2.html : "text/plain" :
http://www.expita.com/nomime.html : to 10K bytes :