How to process form with parameters and method POST in HTML5 and PHP

1 Answer

0 votes
<form action="test-post.php" method="POST">
Enter your age : <input type="text" name="age" /><br />
Enter your profession: <input type="text" name="profession" /><br />
<input type="submit" value="Test Post">
</form>

// test-post.php will run after you enter the age & profession and press the 'Test Post' button

$age = $_POST['age'];
$profession = $_POST['profession'];

echo "age = " . $age;
echo "<br>";
echo "profession = " . $profession;


answered Jul 6, 2014 by avibootz
edited Jul 6, 2014 by avibootz

Related questions

1 answer 258 views
258 views asked Jun 28, 2015 by avibootz
1 answer 308 views
1 answer 543 views
1 answer 363 views
363 views asked May 20, 2014 by avibootz
...