Hi All,
I’m a beginner to PHP and am having trouble with a Dropdown using PHP and SQL.
This is what I have:
$result = mysql_query($sql);
echo " <form id='myForm' action='https://mywebsite.com/forum/index.php/'> ";
echo ' <select name="/"> ';
while ($row = mysql_fetch_array($result)) {
echo "<option value='" . $row['field_181'] ."'>" . $row['field_181'] ." - " . $row['COUNT(field_181)'] . " Events </option>";
}
echo " </select> ";
echo " <br><br> ";
echo " <input type='submit'> ";
echo '<input type="hidden" name="-bowling-tournaments" > ';
echo " </form> ";
So this code is working in that it’s properly displaying the Dropdown items in my database. The problem is that when I click submit, it’s bringing me to this URL: https://mywebsite.com/forum/index.php?/=New%2BYork&-bowling-tournaments=
The URL it SHOULD be bringing me to is https://mywebsite.com/forum/index.php?/new-york-bowling-tournaments/
But I don’t know how to fix it. Can anyone please assist?