0

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

2
Contributors
4
Replies
23
Views
3 Weeks
Discussion Span
Last Post by diafol
0

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.

0

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.

0

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.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.