Hi, I have few check boxes in an .html file and I wonder how can I pass those checked value over to a script by using post method ?
From my understanding, passing value to a script has two ways : GET and POST method.
I've tried the GET method where I use the QUERY_STRING and now I would like to try for the POST method. I'm lack of idea of how to implement it. Help ? =)
I've assigned those check boxes into an array. Piece of code :
<form method="post" action="xxx.php3">
<br><input type="checkbox" name="interest[]" value="Food"> Food
<br><input type="checkbox" name="interest[]" value="Movie"> Movie
<br><input type="checkbox" name="interest[]" value="Gardening"> Gardening
<input type="submit" value="Submit">
</form>
In the xxx.php3, I've tried to get the array variable,
<?php
$array = ${interest};
while(list($key, $value) = each($array))
print "$value<br>";
?>
However, I have error of saying $array is not an array. Please advise. Thank you!