okay i have my cookies being saved... both of them... from the following file.
final.php
PHP Code:
<?php
if ($_POST['age'] == "<16" || $_COOKIE['age'] == "too_young") {
setcookie("age", "too_young", time()+60*60*24*30);
include 'http://192.168.0.1/test/sorry.php?p=young';
} else {
setcookie("join", "completed", time()+60*60*24*30);
include '/sendmail.php';
}
?>
the problem of reading them
PHP Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Join The AMW Clan</title>
</head>
<body>
<?php
include 'http://jonspcrepair.com/inc/header.php';
if (!empty($_COOKIE['too_young'])) {
include 'sorry.php?p=young';
} elseif (!empty($_COOKIE['completed'])) {
include 'sorry.php?p=completed';
} else {
include 'form.php';
}
?>
</body>
</html>
the cookies i think are not even read as it still shows the form
to try this script out your self click here
__________________
AMW_Drizz
Dev Machine:: Apache 2.2.6 PHP 5.2.6 MySQL 5.1
|