You are here: Re: Php Redirect? Or load a new page? « HTML « IT news, forums, messages
Re: Php Redirect? Or load a new page?

Posted by Nonee on 09/08/05 23:09

<?php
if (empty($_POST["name"]))
{
}
else
{
$name=$_POST["name"];
$filename = $name."/index.php";
if (file_exists($filename))
{
echo "The file $filename does exist";
header("Location:
http://".$_SERVER['HTTP_HOST']."/".$filename);
}
else
{
echo "The file $filename does not exist";
}
}
?>

That is the code and it is still not working... Not sure as to why
though. Remember, someone types in a name in a form textbox and posts
it to the same php file. From the submit post, it posts the textbox
("name") and I retrieve it from the $_Post. Etc etc etc. The rest is
pretty self-explainitory. Any other ideas?

Thanks!!!


P.S. Btw, the $name."/index.php" points to a subdirectory using the
$name as the subdirectory. Confused? lol...

On Thu, 08 Sep 2005 18:39:45 +0100, David Dorward <dorward@yahoo.com>
wrote:

>boclair wrote:
>
>>> No idea why, other then perhaps your browser being picky and insisting on
>>> an absolute URL (as required by the HTTP spec)
>
>> All that but the address must be absolute. See the php manual
>
>Err ... I said that.

 

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

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