473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Hide URL parameters

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.
Nov 3 '05 #1
3 12602
On Thu, 03 Nov 2005 08:10:30 +0200, Big Time
<bi**************************@hotmail.com> wrote:
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 it takes to a new page? Which one? Who wrote this page - script by
itself?
Youre sending data to the same script, it reads its and decided what to
display..
Think there is a bug in script, check it.
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.


--
---
Exact Meta Search | Major Search Engine
http://exactsearcher.com
Nov 3 '05 #2
Big Time wrote:
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.


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">
</form>

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

if ($_SERVER['REQUEST_METHOD'] == "POST")
{
// insert your search code here, using the data in $_POST
}

HTH.
Peter.
--
http://www.phpforums.nl
Nov 3 '05 #3
Big Time wrote:
I understand you can hide the parameters by using the POST method,


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?

--
Jock
Nov 3 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Bob Bedford | last post by:
I've my site wich uses POST forms and javascript (see below). Since it's online, some people have called saying that some parts of my site are unavailable. I've seen that the part not accessable...
2
by: Jurjen de Groot | last post by:
Hello, Is there someway to hide the name of the page in the browser? When a page is display the full address is shown like http:\\www.mysite.com\Default.aspx, is there some setting (maybe in IIS...
2
by: Alberto | last post by:
In my url I have some parameters but I'd like the user doesn't see them. How can I hide them? Thank you
8
by: Alex Nitulescu | last post by:
Hi. I have the following question - is it possible (I assume it is, but I have no idea how to do it) to HIDE the href text which automatically shows in the status bar of IE ? I have build a...
3
by: Chris | last post by:
Is it possible to hide specific rows in a listview? I currently have a listview in details view and the user can select multiple views which shows the listview items matching the selected...
3
by: Shimon Sim | last post by:
I have web.sitemap file that is used in sitemappath control. I also have a menu that uses the same sitemap file. is it possible to "hide" some nodes from menu but still have them available for...
3
by: =?Utf-8?B?Um9iZXJ0IENoYXBtYW4=?= | last post by:
Hi, I have a GridView with a fixed number of columns being returned from a SQL query and each having a simple template: <asp:TemplateField HeaderText="Allocations"> <edititemtemplate>...
1
by: iriu | last post by:
is there any why to send parameters to any class and hide action url
1
by: MattGaff | last post by:
I have a parameter (dropdown menu) on my report which will filter or sort the data depending on the chosen option. There are only 2 options to choose from in this dropdown. I want to Hide duplicates...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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
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...

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.