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:13

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

Ok, an update. The new location is pointing to the right directory
but it is still not loading the new page. In addition, it is finding
the file. It just will NOT relocate to the new location. Grrr....


On Thu, 08 Sep 2005 07:12:53 GMT, Nonee <None@none.com> wrote:

>Hello all-
>
> I have a php page that has a form box in it. With that form box, I
>check and see if the value in the form + ".php" is a file that exists.
>(No probs so far) Then if it does exist, I want to redirect the
>browser to go there. I know there is a header("location: $filename");
>that could work but it doesn't. What am I missing and how can I do
>this?
>
>Thanks VERY much... (Been racking my brain and the net all day)
>
>-Josh

 

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

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