doing a login script which remembers your email and says welcome userx:
<?php
if ($POST)
{
$email = $POST['email'];
session_start();
header("Cache-control: private");
$SESSION['email'] = $email;
if(isset($SESSION['email']))
{
echo "Welcome ". $_SESSION['email'];
}
//$_SESSION['email'] = $email;
//if(isset($_COOKIE['$email']))
//{
// //print"</br>";
// print_r($_COOKIE);
// //$_COOKIE = array();
//
// //print $_COOKIE[0];
//}
//else
//{
// $cookie = setcookie("$email", 1);
//}
//print "$cookie";
}
?>
whats wrong with this bit of code?