Keeping ?id=blah out of address bar?

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
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Keeping ?id=blah out of address bar?

Post by Elmseeker »

Hi,

I think the subject pretty much says what I want to do. I don't care that people will still be able to SEE the full url if they want to, I just don't want it to show by default for appearances sake, those URLs with million character query strings LOOK nasty...this is mostly just because I don't like looking at them when I'm on a site so would like to eliminate it from mine...Thank you.
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Post by f1nutter »

If the query string (everything after the ?) is passed from a form, then use the POST method to send data without appending it to the address.
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Post by f1nutter »

And use $_POST (in PHP) to get it back out again.
evilcoder
Forum Contributor
Posts: 345
Joined: Tue Dec 17, 2002 5:37 am
Location: Sydney, Australia

Post by evilcoder »

I think i understand what your saying. However, most sites with queries are template driven, and that site=page is referring to a file that is needed to be included, and instead of creating 30 individual pages only 1 is needed then all the information is loaded in according to queries.
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Hmmm...

Post by Elmseeker »

Well, I am using it in a template but not in a form. I do want and need it to be called by the script and included in the url I am just wondering if there is a way visually hide it from the user...

Thanks again. :)
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Post by f1nutter »

You could place your site within a frame and then the address bar will appear not to change.

Code: Select all

<frameset rows="*, 100%">
<frame src="blank.htm">
<frame src="content.htm">
</frameset>
(I think thats correct!)
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

:)

Post by Elmseeker »

That worked Perfectly, thank you very much ;)
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

but

Post by AVATAr »

this do not stop you from copying an url from a link and paste it in another navigator.
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

have you thought about the Apache RewriteModule? i use it and absolutely love it. lemme know if you would like some help on it.
f1nutter
Forum Contributor
Posts: 125
Joined: Wed Jun 05, 2002 12:08 pm
Location: London

Post by f1nutter »

Had a look at your site, looking good.

For a more complete frames explaination have a look at http://www.w3.org/TR/html4/present/frames.html#h-16.1 which will make your site more compatable with oher browesers.
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Thanks again

Post by Elmseeker »

Had a look at your site, looking good.

For a more complete frames explaination have a look at http://www.w3.org/TR/html4/present/frames.html#h-16.1 which will make your site more compatable with oher browesers.
Thanks, we hope to make it really something whe it's done. I know about frames jst had never occured to me to use them in that way before, pretty clever.
this do not stop you from copying an url from a link and paste it in another navigator.
That's ok though, I don't care if people want to do that it's fine, I just don't want to have to look at it all the time while developing the site lol, will mos tlikely put it back to normal once the site goes live at any rate so i don't have to worry about browser issues and what have you. Thank you for the input though.
Post Reply