Jump to content

Form and php dropdown integrating: creates 2 dropdown instead of 1


dakke

Recommended Posts

I'm new to PHP, HTML, MySQL,... but I thought that this would be rather simple.

I want a drop down box, using values from a mysql field. It works just fine, the php that is, but when I integrate it with a form, nothing happens. This is the code:

<select name="category"> 
<?php include('php/DropdownCategory.php'); ?>
</select>

 

The actual php file works, I created a drop down. But when added to the form (this section is part of a bigger form, so the <form> tags are in place) it creates 2 drop downs. One completely empty, the other the actual php drop down. So it seems that the select does not use the php drop down, but creates an additional one. What am I doing wrong?

 

 

You are going to have to show a lot more code that that if you want an answer (the quality and accuracy of an an answer is directly proportional to the quality and detail of the question).

 

At the very least, post the contents of dropDownCategory.php. That may be enough. But if you want to be sure, post the rest of the code for the form as well.

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.