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 373 views
373 views asked Jun 28, 2015 by avibootz
1 answer 385 views
1 answer 654 views
1 answer 461 views
461 views asked May 20, 2014 by avibootz
...