You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Gerald Richter <ri...@ecos.de> on 2000/09/12 05:26:01 UTC

Re: Cookies ?

> 
> Is possible check if browser allow cookies when use %udat hash ?
> 
> 
> How can check if user had accept cookies in Embperl ?
> 

I don't have tested this, but I think the following should work:

The first page looks like:
[-

$udat{test} = 1 ;
# redirect to another page to see if the cookie gets passed
$http_headers_out{'Location'} = "http://$ENV{SERVER_NAME}/script2.epl" ;

-]

script2.epl:

[$if $udat{test} $]
Cookie set
[$else$]
Cookie not set
[$endif$]

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------