j0hn Posted March 14, 2007 Share Posted March 14, 2007 ok so im a bit stuck here, pretty new to all this ive searched the forum before i posted, but found nothing similar i want to make an input radio button choose between 2 different applets i was thinking of making each radio button simply comment out its opposite <applet> code would that work? so far i have: Applet 1 <input type="radio" checked name="c1" value=""> Applet2 <input type="radio" name="c1" value=""> <applet>applet 1 code goes here</applet> <applet>applet 2 code goes here</applet> my thoughts were to simply add $FORM{'c1'} to the beginning of the <applet> code, to comment it out like: $FORM{'c1'}<applet>applet 1 code goes here</applet> $FORM{'c1'}<applet>applet 2 code goes here</applet> that way i could set the radio buttons to make a value of "#" i dont even know if that would work! problem i see is it would comment out both. any advice? or a better work around? thank you in advance Link to comment https://forums.phpfreaks.com/topic/42720-using-input-radio-to-choose-applet-to-load/ Share on other sites More sharing options...
per1os Posted March 14, 2007 Share Posted March 14, 2007 If you are using PHP why not do this Applet 1 <input type="radio" checked name="c1" value="1"> Applet2 <input type="radio" name="c1" value="2"> if (isset($_POST['c1'])) { if ($_POST['c1'] == 1) { print '<applet>applet 1 code goes here</applet>'; }elseif ($_POST['c1'] == 2) { print '<applet>applet 2 code goes here</applet>'; } } --FrosT Link to comment https://forums.phpfreaks.com/topic/42720-using-input-radio-to-choose-applet-to-load/#findComment-207271 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.