hi all im wondering what i can do to stop this happening
advsearch_result.php?city=&country=&gender=a+man&fage=18&lage=99&accomodate=I+can+Accomodate&minheight=152&sexuality=Straight&bodytype=&race=&piercings=No+piercings&tattoos=No+tattoos&dodrink=&smoker=&pincode=&multipleint=&seeking=a+man&meet_type=&travel=I+can+travel&maxheight=213&partner_sexuality=Straight&partner_body_type=Athletic&partner_race=&partner_piercings=No+piercings&partner_tattoos=No+tattoos&partner_drinking=Don't+drink&partner_smoker=&button.x=90&button.y=19
every time i click submit on a form all this come in address bar after file name the code is currently set as

$male        = $_GET['gender'];
$seek        = $_GET['seeking'];
$age1        = $_GET['fage'];
$age2        = $_GET['lage'];

etc ...

many thanks jan x

Recommended Answers

All 4 Replies

After reading up just changing to post and see what happens x

Member Avatar for diafol

Post will certainly hide it. But the whole point of a get is that it does appear in the address bar so you can bookmark it. Searches should be get as they don't change data. Use post to update add or delete info in a db or to check credentials on login.

Member Avatar for diafol

However the query string is very verbose. If you have your db setup as normalised tables then your query string values should mostly be integers. I'm assuming your values are picked from select drop downs. In this case you should pass the value of the option which should be integer values in most cases.

Member Avatar for diafol

Example of tables I'd use:

cities
======
id
city
country_id

countries
=========
id
country

gender
======
id
gender

accommodation
=============
id
accommodate

sexuality
=========
id
sexuality

bodytype
========
id
bodytype

races
=====
id
race

piercings
=========
id
piercings

tattoos
=======
id
tattoos

dodrink
=======
id
drink

These ids would be used then for the member table as foreign keys.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.