Closed Thread Icon

Topic awaiting preservation: Php print url Pages that link to <a href="https://ozoneasylum.com/backlink?for=24490" title="Pages that link to Topic awaiting preservation: Php print url" rel="nofollow" >Topic awaiting preservation: Php print url\

 
Author Thread
Ensellitis
Bipolar (III) Inmate

From: New York, USA
Insane since: Feb 2002

posted posted 12-24-2004 00:56

Is there a simple PHP command that will print the location it is at?

I have this for my shout box:
<form name="shoutit" method="post" action="index.php">

But I have the script on each page and I am setting up my templates and I was wondering if there was a simple yet effective way to change index.php to what ever page it is currently on automatically...

____________________________________________________

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 12-24-2004 01:16

$PHP_SELF should do the trick for this


I X I
Paranoid (IV) Inmate

From: beyond the gray sky
Insane since: Apr 2004

posted posted 12-24-2004 01:17

you could make a shout.php and have the form action="shout.php"

just a thought



I focus on the pain; The only thing that's real (Trent Reznor)

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 12-24-2004 01:22

Yeah, I X I's way would be better - if you ever change the script, you only have to change it once in one file.


I X I
Paranoid (IV) Inmate

From: beyond the gray sky
Insane since: Apr 2004

posted posted 12-24-2004 01:56

thank you



You know I'd like to keep my cheeks dry today, so stay with me and I'll have it made (Shannon Hoon)

Ensellitis
Bipolar (III) Inmate

From: New York, USA
Insane since: Feb 2002

posted posted 12-24-2004 02:02

That did the trick! Thanks!

____________________________________________________

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 12-24-2004 04:02

The problem with IXI's solutionis that you don't get returned to the page you are on. Shoutbox scripts are usually modules implemented on each page



.:[ Never resist a perfect moment ]:.

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 12-24-2004 07:25

you could pass a variable in an <input type="hidden" value="$PHP_SELF" name="backto"> field to the shoutbox php, then send back to the page of that variable.


Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 12-26-2004 19:33

though you should be using $_SERVER['PHP_SELF'] instead of depreceated global variable

Lurch
Paranoid (IV) Inmate

From: Behind the Wheel
Insane since: Jan 2002

posted posted 12-27-2004 01:08

absolutely


« BackwardsOnwards »

Show Forum Drop Down Menu