Jump to content

Select form with database help


Antiquated

Recommended Posts

Hello everyone and thank you for taking the time to read this. I am very new to coding and I am helping a friend with a website. I'm trying to create a form with a <select> dropdown and filling the options with items from a database, there are very man items so I'm not sure 100% how to go about this, I have some code but I know it's wrong I'm just looking for a nudge in the right direction, any help is appreciated the code can be found below:

 

 

<div style="float:left;">
                                            <select>
                                            $team = $sql->query("SELECT * FROM teams WHERE arenaid ='$platid'");
                                                <option value="<?echo $teams>"></option>
                                            </select>
                                        </div>

 

Again, thank you for taking the time to read this and thank you also for any help you can provide.

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.