PHP not working with Expression Web 3

4d3x

New Member
I'm starting to try to learn PHP while using Expression Web 3. I set up PHP runtime and configured the ini. What happens is my script doesn't do as it should.My page looks like:\[code\]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html dir="ltr" xmlns="http://www.w3.org/1999/xhtml"><head><meta content="en-us" http-equiv="Content-Language" /><title>Sports</title><meta content="text/html; charset=utf-8" http-equiv="Content-Type" /><link href="http://stackoverflow.com/questions/1978408/master.css" rel="stylesheet" type="text/css" /><style type="text/css"></style></head><body><div id="masthead"></div><div id="top_nav"> <ul> <li>Sports </li> <li>Clubs</li> <li><a href="http://stackoverflow.com/questions/1978408/default.html">Cloud</a></li> </ul></div><div id="container"> <div id="left_col"> </div> <div id="page_content"> </div></div><div id="footer"> <form method="post"> </form></div><form action="action.php" method="post"> <p>Your name: <input type="text" name="name" /></p> <p>Your age: <input type="text" name="age" /></p> <p><input type="submit" /></p></form></body></html>\[/code\]Then my PHP file looks like:\[code\]<!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="text/html; charset=utf-8" http-equiv="Content-Type" /><title>action</title></head><body>Hi <?php echo htmlspecialchars($_POST['name']); ?>.You are <?php echo (int)$_POST['age']; ?> years old. </body></html>\[/code\]What should happen is for example if I type John as name and 50 as age, it should output Hi John, you are 50 years old. But instead it says (with Firefox) :Hi you are years oldin Internet Explorer 8, it just outputs the whole php script. I'm not sure where I went wrong.Thanks
 
Top