redirection problem

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
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

redirection problem

Post by pelegk2 »

i am not sure its redirection but
what i want is when a "TAB" pressed
i want to call the same page with :
<a href='?cont=4hr-done'>press 1 </a>

but when i do so i am on the same page but it looks like this :
http://localhost/colors/?cont=4hr-done

what to do?
User avatar
mrvanjohnson
Forum Contributor
Posts: 137
Joined: Wed May 28, 2003 11:38 am
Location: San Diego, CA

Post by mrvanjohnson »

No one will be able to view your sample because you used localhost. You need to define an IP address but to address your problem, if you format your URL link like this it should work.

Code: Select all

<a href="<?php echo $HTTP_SERVER_VARS&#1111;"PHP_SELF"] ; ?>?cont=4hr-done">press 1 </a>
or the shortcut version

Code: Select all

<a href="<?php echo $PHP_SELF ; ?>?cont=4hr-done">press 1 </a>
or super shotrcut version :-)

Code: Select all

<a href="<?=$PHP_SELF ; ?>?cont=4hr-done">press 3 </a>
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

thanks alot

Post by pelegk2 »

that what i needed
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

thanks alot but 1 more question

Post by pelegk2 »

is it possible to "inforce" when a default page is loaded that the name of the page will be show in the adress bar?
thanks in advance
peleg
Post Reply