Jump to content

Recommended Posts

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 :)

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

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.