PDA

View Full Version : Accept/Decline Submit buttons


Cheeseboy
06-14-2007, 01:45 PM
Hey guys,
I still havent gotten that code working so i have made a new one that look somewhat better...i think lol. I was if someone would be kind enough to fix it up for me so that it works?
Thanks!

<FORM name ="form1" method ="post" action ="lgd.php">

<Input type = 'checkbox' Name ='gender' value= 'Accept_Terms'>Accept_Terms
<?PHP print $Accept_terms; ?>


<Input type = 'checkbox' Name ='gender' value= 'Decline_Terms'>Decline_Terms
<?PHP print $decline_terms; ?>


<P>
<Input type = "Submit" Name = "Submit1" VALUE = "Choose_a_Term">
</form>

<?PHP

$Accept_Terms = 'unchecked';
$Decline_Terms = 'unchecked';

if (isset($_POST['Choose_a_Term'])) {

$selected_radio = $_POST['gender'];

if ($selected_radio = = 'Accept_Terms') {
$Accept_Terms = 'checked';
}
else if ($selected_radio = = 'Decline_Terms') {
$Decline_Terms = 'checked';
}
}

?>

timgolding
06-14-2007, 03:17 PM
If we had some idea of what you want to do!

mlseim
06-14-2007, 03:24 PM
You're posting multiple threads for the same question ...

http://www.codingforums.com/showthread.php?t=116318

See my answer on your other thread ... and don't double post.

Cheeseboy
06-14-2007, 04:43 PM
Im trying to get a accept/decline check box working with a submit button. If the accept box is not checked it will not let you go on.