sonicsnail
Technical User
I have a form that's getting sent to a database. The part I'm working on just now is for a few yes/no options... basically, they dot one of them for "pass", the other for "fail".
I think I've been clever though and set their values as "red" and "green", so when it comes to displaying the results, I can use <img src="<*output*>.gif"> and have a little image for each.
My problem is, if they DON'T choose either pass or fail, then a blank value gets sent to the database, and when the database is rendered, it shows a the broken pic link because its parsing <img src=".gif">
here they are...
<input type="radio" name="test1" value="green">
<input type="radio" name="test1" value="red">
can I add some sort of default value so that if the user doesn't click one of the radios it passes (for example) "white" to the database?
thanks in advance,
Pete
I think I've been clever though and set their values as "red" and "green", so when it comes to displaying the results, I can use <img src="<*output*>.gif"> and have a little image for each.
My problem is, if they DON'T choose either pass or fail, then a blank value gets sent to the database, and when the database is rendered, it shows a the broken pic link because its parsing <img src=".gif">
here they are...
<input type="radio" name="test1" value="green">
<input type="radio" name="test1" value="red">
can I add some sort of default value so that if the user doesn't click one of the radios it passes (for example) "white" to the database?
thanks in advance,
Pete