Hi!
It's really a silly question, but i've tried many ways to do it and it's still worthless.... :(
I have a form:

<form action="jobapp.php" method="POST" name="app">
	
	Please, enter your name:
	<input type="text" name="applicant" /><br />
	Please, enter your telephone number:
	<input type="text" name="telephone" /><br />
	Please, enter your e-mail address:
	<input type="text" name="email" />
	</form><br /><br />

and the awful problem is that i just can't make the entered values to be displayed.
I would really appreciate, if you could help me!!!! :$

Hi!
It's really a silly question, but i've tried many ways to do it and it's still worthless.... :(
I have a form:

<form action="jobapp.php" method="POST" name="app">
	
	Please, enter your name:
	<input type="text" name="applicant" /><br />
	Please, enter your telephone number:
	<input type="text" name="telephone" /><br />
	Please, enter your e-mail address:
	<input type="text" name="email" />
	</form><br /><br />

and the awful problem is that i just can't make the entered values to be displayed.
I would really appreciate, if you could help me!!!! :$

In your PHP file jobapp.php, you will receive the values entered in the form in the variable $_POST, since the the form method is "POST".

Long explanation:
When a user submits the form, the browser will send a HTTP Request to your server, with the values of the form in the HTTP Request. The HTTP Request will be a POST request, in url encoded format. The PHP server on receiving this request will decode the url encoded values, and generate the PHP Array $_POST, which these values.

To view the POST data, just retrieve them from the $_POST array.

You can dump all the values of the $_POST array just to see whats happening:

var_dump($_POST);

or you can access an individual value:

echo $_POST['applicant'];
Comments
very nice explanation!

hello..
you should put one submit button...
Try this:

<?
if($_SERVER['REQUEST_METHOD']=='POST')
{
print_r($_POST);
}
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>

<body>
<form action="" method="POST" name="app">
	
	Please, enter your name:
	<input type="text" name="applicant" /><br />
	Please, enter your telephone number:
	<input type="text" name="telephone" /><br />
	Please, enter your e-mail address:
	<input type="text" name="email" />
	<br /><br />
	<input type="submit" name="Submit" value="Go!!" />
	</form>
</body>
</html>
This article has been dead for over six months. Start a new discussion instead.