mercredi 15 avril 2015

PHP file in WAMP isn't accepting any value from html's GET or POST methods


<!DOCTYPE HTML>
<html>
<body>
<form action="testrun.php" method="GET">
Name: <input type="text" name="name"><br>
E-mail: <input type="text" name="email"><br>
<input type="submit">
</form>
</body>
</html>


and testrun.php is



<html>
<body>
Welcome: <?php echo $_GET["name"]; ?><br><br>
Your email address is: <?php echo $_POST["email"]; ?>
</body>
</html>


and this is the output i'm getting after typing 'xyz' in Name and 'xyz@abc' in Email text box:


Welcome


Your email address is:


NOTE: i have enabled 'rewrite_module' in Apache>Apache Modules>


I'm struck with this and donno where the problem might be. Can anyone help me out? Thanks in advance :)


Aucun commentaire:

Enregistrer un commentaire