i have a basic script where in i check if the content is inputted or not .
If the content is not present i redirect to the same page also echoing a statement that u have not entered any data , but the echo message is not being printed.
the below is redirect.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ?
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<form action="redirect.php" method="post">
Name: <input type="text" name="yourname" maxlength="150" /><br />
<input type="submit" value="Submit" style="margin-top: 10px;" />
</form>
</body>
</html>
the below is redirect.php
<?php
if (trim ($_POST['yourname']) == "")
{
echo " u have not entered any data ";
header ("Location: redirect.html");
exit;
}
echo $_POST['yourname'];
?>