Here's the page displaying the pulldown:
http://pnanetwork.com/PNA_category.php

When the submit butt is pressed, it doesn't seem to go to the query page in the "Action" tag to show results.

Here's the code:

$query = ("SELECT DISTINCT custfield2 from smpro_list order by custfield2");
//$query = ("SELECT * from smpro_list order by custfield2");
$result = mysql_query($query) or die('Could not connect: ' . mysql_error());

if (mysql_num_rows($result) == 0)
{

} else
{

//echo "<B> Current Chapters List </B>";
echo "<select name='Category'>";
echo "<option>" . "Select" . "</option>";
while($row = mysql_fetch_array($result))
{
$category_name = $row['custfield2'];
echo "<form action='PNA_member-by-Category.php'>";

	echo "<option>" . "$category_name" . "</option>";

	           }

}

echo "<BP><BR><p align='center'>" .
"<input name='Search' type='submit' id='Search' value='Submit'>" .
"</p> </form>";

?>

    A quick look at the source code show

    <form action='PNA_member-by-Category.php'><option></option>
    <form action='PNA_member-by-Category.php'><option>11830 W. Sample Road</option>
    <form action='PNA_member-by-Category.php'><option>5645 Coral Ridge Dr.</option>
    <form action='PNA_member-by-Category.php'><option>6540 nw 74 dr</option>
    and on and on......

    You should only have one <form></form> and then all your HTML.

    You should start there.

    luck,

    Don

      Looks like you are generating your dropdown through a loop; it is creating <form ... tag a gazillion times. Put that tag outside of your php loop. When things don't behave as expected, looking at the HTML source usually tells you the source of errors.

        Also, your HTML ends with.

        </TABLE>
        <!-- End ImageReady Slices -->

        Either your code is causing the page to end before it should or your missing the

        </body></html>

        tags.

        Post the PHP code so we can see it.
        Also, please enclose the code with

        [ php]
        [ /php]

        -- don't use any spaces in these 2 tags, I just put them in so you could see the tags and they would not be parsed.

        Don

          Write a Reply...