You are here: Re: [PHP] $PHP_SELF or echo $PHP_SELF « PHP « IT news, forums, messages
Re: [PHP] $PHP_SELF or echo $PHP_SELF

Posted by Richard Davey on 07/14/05 13:37

Hello Ross,

Thursday, July 14, 2005, 11:11:25 AM, you wrote:

R> Just a quick thing that is bugging me. In some of my older
R> textbooks a form is returned to the same page by using

R> echo $PHP_SELF no just $PHP_SELF

R> is this just used in older versions of php?? Does the it make a
R> difference what one is used?

PHP_SELF is part of the $_SERVER super global, you should really
access it like this:

$_SERVER['PHP_SELF']

To answer your question though, it's just a variable - if you want to
output it into your form action then you can do either:

<? echo $_SERVER['PHP_SELF'] ?> or <?=$_SERVER['PHP_SELF']?>

Either would work.

Best regards,

Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
"I do not fear computers. I fear the lack of them." - Isaac Asimov

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация