You are here: Re: correct entry for php_self « All PHP « IT news, forums, messages
Re: correct entry for php_self

Posted by J.O. Aho on 07/17/06 18:21

carlton wrote:
> I have tried text book the example below, however,
> $PHP_SELF contains the full pathname of the file, rather than the
> location of the file relative to localhost.
> The page is called using http://localhost/picturecash/selfcall.php
> $PHP_SELF=/var/www/html/picturecash/selfcall.php, hence I get the error
> 404 when the for posts.
> How do I get the page to successfully call its self?

> <FORM ACTION="<?php print $PHP_SELF?>" METHOD="POST">

try with:

<FORM ACTION="<?php echo $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; ?>"
METHOD="POST">

or even better

<FORM ACTION="" METHOD="POST">


For more info about the variables, see
http://www.php.net/manual/en/reserved.variables.php


//Aho

 

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

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