I want to make a php code with my dropdown menu in html. Can you help me? This is my code in html

<form method="POST" action="search.php">
<h2 align="center" style="Verdana"> List of Voters Search </h2>
<div align="center">
<table>
<table border="0">
<tr><td>Select One:</td><td><select name="dropdown1">
<option value="Firstname">Firstname</option>
<option value="Voters_Id">Voter's Id</option>
<option value="All">All</option>
<input type="text" name="choicetext">
</select></td></tr>
<tr><td>Select City:</td><td><select name="dropdown2">
<option selected value="">--Select--</option>
<option value="Borongan">Borongan</option>
</select></td></tr>
<tr><td>Select Barangay:</td><td><select name="dropdown3">
<option>--Select one--</option>
<option value="Alang-alang">Alang-alang</option>
<option value="Balud">Balud</option>
<option value="Maypangdan">Maypangdan</option>
<option value="Campesao">Campesao</option>
<option value="Hindang">Hindang</option>
<option value="Barangay">All Barangays</option>
</select></td></tr>
<tr><td>Precincts:</td><td><select name="dropdown4">
<option selected value="">--Select--</option>
<option value="Precinct1">Precinct 1</option>
<option value="Precinct2">Precinct 2</option>
<option value="Precincts">All precinct</option>
</select></td></tr></table><input type="submit" name="Submit" value="Search"></p>
</table>
</div>
</form>

What exactly is it you want your PHP code to do? Generate the form? Process the form after submission?

And please use the "Code" button in the editor when you want to post code.

I want to display my any data from sql but i don't know how to code the drop down with php. Can you help me?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.