Radio button/Checkbox value passing

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a simple 3 page registration form. One form, one "data
validation" script and one "insert into database" script. The customer
bounces back and forth from the form to the verification script until
the data is all correct. (When I say bounces, I mean logically. All the
customer ever sees is the registration form, plus or minus error

The problem I am having, is that if verification fails, the customer is
redirected to the form. I am able to pass the input values from the
"data validation" script back to the registration form using this
<input id="Name" name="Name" type="text" value="<?php echo $Name ?>>

It works well, but I don't know how to pass the variable of a radio
button or check box back. I remember in javascript and other similar
languages you could do something like:

Is there a way to do this in PHP? What I am attempting to do, is make
is so that if the customer chooses YES on a radio button and the form
is submitted,; ifthey are sent back to the form to correct an error,
the radio button YES is still checked. I am not just trying to pass the
variable, but to also make it select the right option when it goes

(Or is this just more of an HTML question, at which point I will ask

Re: Radio button/Checkbox value passing

Jerim79 wrote:
Quoted text here. Click to load it

AFAIR you have to use a condition to write "checked" into the tag if the
submitted value for the radio button group matches this button's value:
<input type="radio" name="whatever" value="Yes"  
<?php if ($whatever.value=="Yes") echo " checked";?>
Quoted text here. Click to load it
(I hope I got that right; working from memory!)

Site Timeline