I have a PHP Yahoo weather script consisting of a form where you input your zip code. This gets a Yahoo weather xml document which displays on a second page.
This works fine, except the user must input his zip code each time he visits the site. I'd like to customize it so users can enter their zip code once and have their local weather appear whenever they visit the page.
i need someone can help me how to write that session cookies for zip code, I have tried that myself by put
<?php
$zip = $_POST['zip'];
if( ( $zip != null ) )
{
setcookie( "zip", $zip, time()+3600*24*30*365);
}
?>
for some reason is not working.
I have attahced full file for you to download and test it with session cookies. please help me thanks.
AM