| 
 Posted by webmasterATflymagnetic.com on 01/24/08 00:38 
Ok, shortly after posting this I've got my answer (ie code that 
works). The only change I've made to the above is to replace 
 
	if ($submit) { 
 
with 
 
	if(isset($_POST['submit'])) { 
 
and it now works! So please ignore this request. 
 
<html> 
<body> 
<?php 
if(isset($_POST['submit'])) { 
	// process form 
	while (list($name, $value) = each($HTTP_POST_VARS)) { 
		echo "$name = $value<br>\n"; 
	} 
}else{ 
	// display form 
?> 
	<form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>"> 
		First name:<input type="Text" name="first"><br> 
		Last name:<input type="Text" name="last"><br> 
		Address:<input type="Text" name="address"><br> 
		Position:<input type="Text" name="position"><br> 
		<input type="Submit" name="submit" value="Enter information"> 
	</form> 
<?php 
} // end if 
?> 
</body> 
</html>
 
[Back to original message] 
 |