Tuesday, December 1, 2015

Post command in PHP

This sample program will show you how to use POST command in PHP to accept and pass the value from one web page to another web page.

If you  have some questions please send me an email at jake.r.pomperada@gmail.com and jakerpomperada@yahoo.com

My mobile number here in the Philippines is 09173084360.
 
 
Program Listing
 
post.php
 
 <html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>

welcome.php
 
<html>
<body>
Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.
</body>
</html>

No comments:

Post a Comment