PHP code is displayed.
Posted: Sat Aug 14, 2010 1:16 am
Hey guys,
So here's a simple HTML form code:
And then I create step2.php:
Once the user submits their inquiry, the web browser of course goes to step2.php, however the code is displayed, not what the code should display.
How to fix this?
Best regards,
Chase!
So here's a simple HTML form code:
Code: Select all
<html>
<head>
<title>Contact Us</title>
</head>
<body>
<form action="C:\Websites\step2.php" method="post">
Name<br><input type="text" name="username" /><br>
Email<br><input type="text" name="email" /><br>
Inquiry<br><textarea row="7" cols="70" name="inquiry"></textarea><br>
<input type="submit" value="Sumbit" />
</form>
</body>
</html>Code: Select all
<?php
$name = $_POST['username'];
$email = $_POST['email'];
$text = $_POST['inquiry'];
echo $name . '<br>' . $email;
?>How to fix this?
Best regards,
Chase!