Hide URL parameters

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I have a search form used to query a MySQL database.  I want the search  
results to appear on the same page as the search form, below the search box  
after the have entered their search criteria.  I can do this using the GET  
method, however this displayrs all the parameters in the URL.  I understand  
you can hide the parameters by using the POST method, however what I'm not  
understanding is how I can display the results on the same page.  If I use  
the POST method, it takes the user to a new page which I don't want.  How do  
you hide the URL parameters for a form, while displaying the results on the  
same page?  Is there a quick and easy way to just hide the URL parameters?

Thanks for your help.  

Re: Hide URL parameters

On Thu, 03 Nov 2005 08:10:30 +0200, Big Time  

Quoted text here. Click to load it

How it takes to a new page? Which one? Who wrote this page - script by  
Youre sending data to the same script, it reads its and decided what to  
Think there is a bug in script, check it.

Quoted text here. Click to load it

Exact Meta Search | Major Search Engine

Re: Hide URL parameters

Big Time wrote:
Quoted text here. Click to load it

Hi Big Time,

Why would it take the user to a new page? It can take the user to the  
same page as well:

<form name="search" action="<?php echo $_SERVER['PHP_SELF'];" method="POST">
Search for: <input type="text" name="keyword">
<br />
<input type="submit" value="Search">

Then at the top of your searchscript, say something like:

    // insert your search code here, using the data in $_POST


Re: Hide URL parameters

Big Time wrote:

Quoted text here. Click to load it

put this to yourself:  is 'hiding the parameters' sufficient grounds for
switching to the POST method?   i.e. does it outweigh your reasons, if you
had any, for choosing GET in the first place?


Site Timeline