Parsing Form Data

A

Anonymous

Guest
You have to specify that the variable is an array.
An example

Code:
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="get">
<select name="selection_arr[]" size="5" multiple>
  <option value="one" selected>one</option>
  <option value="two">two</option>
  <option value="three">three</option>
  <option value="four">four</option>
</select>
<input name="Submit" type="submit" value="Send it">
</form>

<?php
if ( isset ( $_GET["selection_arr"] )) {
	 print_r ( $_GET [ "selection_arr" ] );
}
?>

Then, if you pass semicolons in variables through URL, they will be parsed as strings.
 
In that situation than a=A;b=B;c=C etc i'm propose use array
 
Back
Top