473,473 Members | 2,215 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Drop Down Menu not posting values

30 New Member
Hey all,

This is really simple but I just can't get it work. I have a drop down menu, you select your filter which will repost to the same page and grab that filter which will be used for an SQL query.

[PHP] $filter = $_POST['selectedFilter'];

if ($filter == "" || $filter == "All")
{
$query = "SELECT * FROM orders WHERE orderStatus = 'New'";
}
else
{
$query = "SELECT * FROM orders WHERE orderStatus = 'New' AND reviewType = '" . $filter . "'";
}

$result = mysql_query($query);

?>
<form action="orders.php" method="post">
<select name"selectedFilter">
<option value="">Review filter</option>
<option value="All">All</option>
<option value="Free">Free</option>
<option value="Visual">Visual</option>
<option value="Content">Content</option>
<option value="Full">Full</option>
</select>
<input type="submit" class="button2" value="Submit" />
</form>
<?php[/PHP]

When I use a GET method I can see the value in the address bar but I still can't access it with $_GET (it just comes up empty).

And that's the same with the $_POST it's not coming up with any value in the post. I've tried posting to another PHP file and I can get the same, the POST value is empty.

Any ideas?

Thanks
Mar 23 '08 #1
4 1639
hsriat
1,654 Recognized Expert Top Contributor
In orders.php, write this in the starting and see what it shows.[php]<?php
echo "<pre>";
print_r($_POST);
echo "</pre>";
?>[/php]
Mar 23 '08 #2
Markus
6,050 Recognized Expert Expert
You've missed the equals sign (=) out in the select name=

Expand|Select|Wrap|Line Numbers
  1.     <select name="selectedFilter">
  2.  
:) regards.
Mar 23 '08 #3
mlevit
30 New Member
You've missed the equals sign (=) out in the select name=

Expand|Select|Wrap|Line Numbers
  1.     <select name="selectedFilter">
  2.  
:) regards.
OMG I don't know how I missed that :) I'm amazed it never came up as an error in the browser.

Any ways, thanks for the help.
Mar 23 '08 #4
Markus
6,050 Recognized Expert Expert
OMG I don't know how I missed that :) I'm amazed it never came up as an error in the browser.

Any ways, thanks for the help.
It happens!

See you around.

Regards, markus.
Mar 23 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: julian | last post by:
hi I was wondering if anyone can help me out on this.... I have dynamcally populated a drop down menu with data from an access database using ASP. The values seem fine, however when i pass...
6
by: PT | last post by:
I got a form with many text boxes, checkboxes and 3 drop downs. From that 3, 2 are dependant. I can choose one drop down, and the next drop down should display the dependant values of the first...
3
by: KK | last post by:
Drop-down menus are the hottest thing since Wonder Bread but . . . 1. Alot of people put them in the they-look-nice-but-you-cant-code-them-right-so-they-always-look-messed-up category (a la...
11
by: Dan | last post by:
Hello all, I am getting records from a db and displaying the records to the user through a drop down menu in an asp page. Each record has 6 fields and I need to display them all to the user in...
4
by: Vegard H. Villmones | last post by:
Hi. I have a table containing a list of about 5000 numbers, and there is also in existence one MSWord document for everyone of them numbers. I want to create some sort of drop down menu (in a...
3
by: Andy Munnis | last post by:
Need help with creating a drop down menu. I am trying to replicate the GUI of a large db application that runs on large Sun servers using Oracle/Solaris, etc. My purpose is to create a stand-alone...
3
by: scaredemz | last post by:
hi, so i'm creating a dynamic drop-down menu. the menu and the text show up fine in IE but only the drop-down shows in Firefox without the menu text. Below is the fxn code. help pls. function...
0
by: kajir | last post by:
Hi, I am new at using ASP.Net 2.0. I have various drop down lists on my master page. They refer to an SQL database. I also have a menu on the master page. I can select the values in the drop...
2
by: Boujii | last post by:
Greetings, I have been attempting to make a drop down menu of countries. From this menu I wish to create a variable in order to INPUT into mysql database. I have no trouble making the drop down menu,...
4
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.