The problem is that this file contains HTML markup, it looks like it may have been created with an HTML editor.quillan wrote:http://www.chambresdhote.com/thankyou.php
The PHP file should contain only the PHP script I posted earlier.
The best way to ensure this is to use a plain text editor. Not a word processor or HTML editor.
The contents of the file are currently
Code: Select all
<!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">
<head>
<meta content="en-gb" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Untitled 1</title>
<meta content="copy-of-poetic 011, default" name="Microsoft Theme" />
<style type="text/css">
* {
/* Reset browsers default margin, padding and font sizes */
margin: 0;
padding: 0;
}
</style>
</head>
<body>
<p><code><?php<br />
<br />
//this if statement tests for French and redirects to a French page<br />
if($_GET["lang"] == "fr") <br />
{ <br />
header("location: http://www.cdh-cavirac.com/reservations/merci.html"); <br />
die;<br />
} <br />
<br />
//this if statement tests for English and redirects to a English page<br />
if($_GET["lang"] == "en") <br />
{ <br />
header("location: http://www.chambresdhote.com/reservations/thankyou.html");
<br />
die;<br />
} <br />
<br />
//if none of the above matched redirect to this page<br />
header("location: http://www.chambresdhote.com/index.html"); <br />
<br />
?><br />
</code></p>
</body>
</html>