Jump to content

Recommended Posts

When I search for something from a search drop down box, the URL reads:

 

delprod.php?search=

 

BUT, the correct items are displaying.

 

Now, if I select a different option from the drop down, the first selection I made displays in the URL but the correct items were queried and displayed on screen.

 

Seems like the URL is always 1 behind the selection.

 

Below is the form action code, which will echo perfectly, but for some reason doesnt go directly to the URL. 

 

Let me know if you need a different part of the code.

 

action="delticket.php?search=<?php echo $search; ?>"

It is difficult to tell from just that however I assume that the $search is a posted value from the form meaning that you are posting the data to the last post location. Can you check what $search is defined at and whether or not you have a 'method=' in your form tag.

if(isset($_POST['go_btn']))
{
	$search = $_POST['search_box'];

 

<form id="form3" name="form3" method="post" action="delticket.php?search=<?php echo $search; ?>">

 

The name of the drop down box is search_box.

 

if I echo $search, it shows the correct value.  But when I echo it in the URL, its always 1 behind.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.