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.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.