To retrieve the variables in the page specified in the action attribute of your form (in your case, listbox.php) use:
PHP Code:
$_POST['field_name'];
For a form passed using the POST method, or:
PHP Code:
$_GET['field_name'];
For a form passed using GET.
In both cases, 'field_name' is the name of the field for which you want to get the value. IN your case, you have two: price and enginesize.
However, if you use the same form you posted, you'll run into problems: notably, no value will ever be passed, since you must specify, in each option tag, the value attribute, which is the value to pass if that specific radio button was selected.
Whereas textboxes (input type="text") pass their contents, for radio buttons and checkboxes, you must specify each controls' value. The text you insert between the start and closing tags are only for display purposes.
Hope that helps.
|