Closed Thread Icon

Topic awaiting preservation: $PHP_SELF (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=12120" title="Pages that link to Topic awaiting preservation: $PHP_SELF (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: $PHP_SELF <span class="small">(Page 1 of 1)</span>\

 
maninacan
Paranoid (IV) Inmate

From: Seattle, WA, USA
Insane since: Oct 2001

posted posted 03-18-2002 00:06

ok so this variable points to the current document. so say I had this code on www.kewlster.com/main.php
echo "$PHP_SELF";
that would print out: "www.kewlster.com/main.php"
but if I had the same code on www.kewlster.com/main.php?page=home
it would still echo out the same thing, understand?
so I need a way to also include the variables in the URL. Any suggestions?

http://www.kewlster.com

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-18-2002 00:45

$QUERY_STRING variable contains all parameters that are passed through URL...


maninacan
Paranoid (IV) Inmate

From: Seattle, WA, USA
Insane since: Oct 2001

posted posted 03-18-2002 01:39

ok, I thought that would fix what I needed, but it didn't. I'm submitting a form to the same page, and I want it to keep the parameters that are there to begin with. So I have lets say:

<FORM METHOD=post ACTION=$self>
and $self = $PHP_SELF . "?" . $QUERY_STRING;
but it still gets rid of the parameters when I submit the form.

http://www.kewlster.com

Pugzly
Paranoid (IV) Inmate

From: 127.0.0.1
Insane since: Apr 2000

posted posted 03-18-2002 06:07

The question that comes to my mind -

Are you setting $self BEFORE you write the <form> tag?

I know, it's a stupid question - but maybe you overlooked it.
alert $self from the form page and see if it's set correctly.

mr.maX
Maniac (V) Mad Scientist

From: Belgrade, Serbia
Insane since: Sep 2000

posted posted 03-18-2002 07:36

That won't work. Only way to submit parameters from form is by using hidden fields...

<INPUT TYPE="hidden" NAME="param_name" VALUE="param_value">


« BackwardsOnwards »

Show Forum Drop Down Menu