the form i have in the first page of the website is
Code: Select all
<form action="c1.php", method="POST">
<input name="day" type="text" value="DD" size="10" maxlength="2">
<input name="month" type="text" value="MM" size="10" maxlength="2">
<input name="year" type="text" value="YYYY" size="10" maxlength="4">
<input type="submit" value="GO!">
</form>Code: Select all
<html>
<head>
<title></title>
</head>
<body>
<?php
$y=date('Y');
$m=date("m");
$d=date("d");
$year=$_POST["year"];
$month=$_POST["month"];
$day=$_POST["day"];
$year2=$y-$year;
if($year2>21)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexyes.html">';
}
if($year2<21)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexno.html">';
}
if($year2=21)
{
if($month>$m)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexyes.html">';
}
if($month<$m)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexno.html">';
}
if($month=$m)
{
if($day>$d)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexyes.html">';
}
if($day<$d)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexno.html">';
}
if($day=$d)
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=indexyes.html">';
}
}
}
?>
</body>
</html>