I am facing this error. The path of my file is "www/new/filename.html". What is the cause of error. Is the error is because of wrong code or due to configuration issue? I am trying to print the details of form on same file but i am getting error.
<html>
<body>
<?php
$name="";
$ne="";
if($_SERVER["$_REQUEST_METHOD"]=="POST")
{
$name=$_POST["nam"];
if(empty($name))
{
$ne="Error"
}
}
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
Name: <input type="text" name="nam"><?php echo $ne;?>
Gender<input type="radio" name="gen" value="male">Male
<input type="radio" name="gen" value="female">female
<input type="submit" name="submit" value="Submit">
</form>
<?php
echo "<h1> Inputs </h1>";
echo "$name";
?>
</body>
</html>