if the user selects radio button 1 or 2 then they are asked to discribe in more deatle in a textarea if they select radio 3 or 4 then they dont have to
here is the problem this information needs to be added to a db??
Well, if you've got everything done except for adding to a database, then there shouldn't be much of a problem--it's not hard to connect to a DB usually. What database are you using? MySQL?
[J]ona
Visit Slightly Remarkable to see my portfolio, resumé, and consulting rates.
well, your first line of defence would be javascript. NEVER trust this entirely, though. It is just so your users don't need to reload the page if they get it wrong. Than you would do somthing like this(I have not tested this code ):
PHP Code:
<?php
if(isset($HTTP_POST_VARS['radio1'])){ // the isset function checks to see if the variable "radio1" is set
if($HTTP_POST_VARS['radio1']=='yes'){
if{$HTTP_POST_VARS['write_here']!=''){
//submission script here
}else{echo "if you ticked the \"yes\" button, you need to fill out some info!";}
}
}
?>
But, like jona said, what type of submission are you using?
We could drive you a little less crazy if you told me
Bookmarks