Using php search with mysql. Question about GET.

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
cbunting
Forum Newbie
Posts: 1
Joined: Thu Jun 13, 2002 12:10 am

Using php search with mysql. Question about GET.

Post by cbunting »

Hello,
I am working on a search engine and I'm using the GET method instead of POST. While I have no problems really with the search engine, I was just wondering if there is a way to get rid of the string or whatever after the second & and like such,

search.php?=zipcode&search=55555&submit.x=13&submit.y=7

I would like to have this show as,

search.php?=zipcode&search=55555

Is this possible to leave one & after zipcode&search but remove the rest of the string after the zip code itself?

Sorry if this doesn't make sense. I'm new to php and can't find anything related to this yet. Not exactly sure what I'm looking for. Thanks in advance.

Chris
Peter
Forum Commoner
Posts: 28
Joined: Mon Jun 10, 2002 12:40 am
Location: Brisbane, Australia

Post by Peter »

eregi_replace("&submit.x=(.*)&submit.y=(.*)", "", $string);

Hope that helps! ;)
Post Reply