Sorry about this question "Im a novice at this "

Ok read all the info on this special variable but i still havent got a clue what they are on about ?? "Duh" yeah i know but if someone can put this into plain english for me it would be helpfull

1: What does it do i see this included in forms for submission of values
acording to one tut it does the following but im still perplexed by this

As follows

Also note the use of the variable $PHP_SELF. This variable, which stores the
script's name and location, is passed along with every PHP page. It's
helpful here because we just want this file to call itself. Using $PHP_SELF,
we can be sure that will happen, even if the file is moved to another
directory - or even another machine.

2: Where would i use this and why would I use this. Whats its purpose can
any one give me an explained example " may be an algorithm or something "
From what I understand is that if you use this on one php script then
calling another script with the variable $PHP_SELF contained within will
remember the previous script " <<< Now im really confused !!

Manythanks Mark
mark@harrington.force9.co.uk

"Having to teach myself due to cost of university fees in the UK " Excuse
mysarcasm "Chucle chuckle " I know its a bit dry

    All $PHP_SELF does is give the current page. If a page is designed to be submitted to itself, then the it's easiest to just put $PHP_SELF or $_SERVER['PHP_SELF'] as the action, then to put in the name of the file. That way, you can move and rename the file and it will still work. No need to go in and change the action parameter of the form.

      Write a Reply...