PHP PAGE CODE Q
Posted: Fri Dec 27, 2013 6:34 am
my php web page keep displaying blank page, here is my php page:
i use readyspace to do website, thanks for help.
Code: Select all
<html >
<head>
<title>Registration Result</title>
</head>
<body>
<h1>Thank you for registering with us!</h1>
<?php
$firstname=$_POST['firstname'];
echo"Thank you, <b>$name</b>.<b>You enter the following details:<br/>";
$gender=$_POST['gender'];
echo"1.<b>Gender.<b>$gender<br/>";
$userid=$_POST['userid'];
echo"2.<b>Userid.<b>$userid<br/>";
$password=$_POST['password'];
echo"3.<b>Password.<b>$password<br/>";
$date=$_POST['date'];
$month=$_POST['month'];
$comments=$_POST['comments'];
echo"3.<b>Date of Birth.<b>$date/$month/$comments<br/>";
if(!empty($_POST['firstname'])){
$firstname=$_POST['firstname'];
}
else if{
$firstname=null;
echo"<p>You didn't enter your name!</p>";
}
if(!empty($_POST['gender'])){
$gemder=$_POST['gender'];
}
else if{
$gender=null;
echo"<p>You didn't enter your gender!</p>";
}
if(!empty($_POST['userid'])){
$userid=$_POST['userid'];
}
else if{
$userid=null;
echo"<p>You didn't enter your userid!</p>";
}
if(!empty($_POST['password'])){
$password=$_POST['password'];
}
else if{
$password=null;
echo"<p>You didn't enter your password!</p>";
}
if(!empty($_POST['date'])){
$date=$_POST['date'];
}
else if{
$date=null;
echo"<p>You didn't enter the date!</p>";
}
if(!empty($_POST['month'])){
$month=$_POST['month'];
}
else if{
$month=null;
echo"<p>You didn't enter the month!</p>";
}
if(!empty($_POST['comments'])){
$commments=$_POST['comments'];
}
else if{
$comments=null;
echo"<p>You didn't enter the year!</p>";
}
if($userid="johntan"&&
$password="niceday!";){
header("Location:NEW4.html")
}
else if{
echo"<p>Login is not successful, please try again</p>";
}
?>
</body>
</html>