HIDE URL VARIABLES

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
gurjit
Forum Contributor
Posts: 314
Joined: Thu May 15, 2003 11:53 am
Location: UK

HIDE URL VARIABLES

Post by gurjit »

Hi all,

I dont want to use frames but i want a way that i can hide the url variables from the user in the tool bar.

for example i might have a page such as:

http://www.mydomain.com/location.php?id=1&cid=2


i want the user to see either

http://www.mydomain.com
and despite what link is clicked from the navigation this is the only name in the tool bar

OR

http://www.mydomain.com/location.php
the id and cid variables do not get shown even though they are still passed through.

IS THIS POSSIBLE IS THE MAIN QUESTION????????????

ANY IDEAS WILL HELP. NO FRAMES CAN BE USED.

i have tried making two virtual domains and holding code on the second domain name while users type the first domain name. i then transfered the first domain to look at the second domain. This is succesful up to the point until someone clicks a link on the navigation bar which then triggers the second domain to start showing in the toolbar.

PLEASE HELP.
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

If you can use forms/buttons instead of links you can use POST instead of get....
User avatar
gurjit
Forum Contributor
Posts: 314
Joined: Thu May 15, 2003 11:53 am
Location: UK

Post by gurjit »

cannot convert to forms, the entire site is about 300 php templates and has been done using <a href> links.
User avatar
xisle
Forum Contributor
Posts: 249
Joined: Wed Jun 25, 2003 1:53 pm

Post by xisle »

cookies would work if that is an option.
$PHP_SELF?target=newpage?id=$id&cid=$cid, set a cookie with values to be passed, then use a header to call the target page
AaronSmith
Forum Commoner
Posts: 32
Joined: Fri Mar 28, 2003 3:14 pm

Post by AaronSmith »

You can superficially hide the URL using frames... even a "secret" hidden frame would do it - and that would only require changing your index page.
m3rajk
DevNet Resident
Posts: 1191
Joined: Mon Jun 02, 2003 3:37 pm

Post by m3rajk »

AaronSmith wrote:You can superficially hide the URL using frames... even a "secret" hidden frame would do it - and that would only require changing your index page.
yet since he's using get, right click "open in new window"
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

And the "NO FRAMES CAN BE USED. " part of the message also rules frames out.

I'd say that xisle's idea about cookies and header() would be the solution, otherwise i'm stumped. Note that a user can fish out the header()'s too with various techniques, so dont consider it 100% foolproof.
Post Reply