I'm trying to make this simple PHP script for work function correctly, but I keep getting this error when I try to run it from the actual site (it works fine on local host).
The error is:
Warning: Cannot modify header information - headers already sent by (output started at /home/cmccorma/public_html/index.php:15) in /home/cmccorma/public_html/index.php on line 17
I thought it was a white space issue at first so I tried to eliminate all white space, but I'm not having any luck.
Here is the code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Test</title>
</head>
<body>
<p>Now, we must verify that you are, indeed, a linguist!</p>
<br />
<p>Whats is the last name of the linguist most associated with the Linguistic Determinism hypothesis?</p>
<form>
<input type="text" name="name"><br />
<input type="submit" rext="submit"/>
</form><?php $name = strtolower($_GET["name"]);
if ($name=="whorf" || $name=="sapir"){
header("Location: correct.html");
}else{
header("Location: incorrect.html");
}?></body>
</html>
Any ideas? Thanks for your help.
Cody

New Topic/Question
Reply



MultiQuote




|