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