|
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
[Back to original message]
|