Tue Oct 28, 2008 12:03 am
<html>
<head>
<title>An HTML form including a SELECT element</title>
</head>
<body>
<form action="formDataReadFromGETorPOSTRequest.php" method="POST">
<input type="text" name="user">
<br>
<textarea name="address" rows="5" cols="40"></textarea>
<br>
<select name="products[]" multiple>
<option>option1
<option>option2
<option>option3
<option>option4
</select>
<br>
<input type="submit" value="OK">
</form>
</body>
</html>
<!-- formDataReadFromGETorPOSTRequest.php
<html>
<head>
<title>Extracting parameters from either a GET or POST request</title>
</head>
<body>
<?php
$PARAMS = (isset($HTTP_POST_VARS)) ? $HTTP_POST_VARS : $HTTP_GET_VARS;
foreach ( $PARAMS as $key=>$value ){
if ( gettype( $value ) == "array" ){
print "$key == <br>\n";
foreach ( $value as $two_dim_value )
print "...$two_dim_value<br>";
}else {
print "$key == $value<br>\n";
}
}
?>
</body>
</html>
-->
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.