Jump to content

How do i change this code from a Checkbox to a Select Menu


afam4eva

Recommended Posts

Howdy everyone, please i need help changing a php coded form from a checkbox to a select menu. Here's the form.

 

<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" >

<table class="dtable2">

                <tr><th colspan="5">Enter a domain name:</th></tr>

<tr><td colspan="5"><center>www.<input name="domain" type="text" size="35" /></center></td></tr>

                <tr><th colspan="5">Select an extension:</th></tr>

<tr>

            <?php

            $i = 0;

                foreach ($this->serverList as $value) {

                    if ($value['check'] == true) $checked=" checked ";

            else $checked = " ";

           

            echo '<td><input type="checkbox" name="top_'.$value['top'].'"'.$checked.'/>.'.$value['top'].'</td>';

                    $i++;           

            if ($i > 4) {

                $i = 0;

                echo '</tr><tr>';

            }

            }

           

            ?>

</tr>

</table>

<center><input type="submit" name="submitBtn" class="sbtn" value="Check" /></center>

            </form>

<?php

 

 

 

 

I'll really appreciate your help.

Link to comment
Share on other sites

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.