hi, im using php_self. and heres what i got.
if(!isset(submit)) { draw form}
else { create account etc etc}
my thinkin is that everything after testing, if submit is set, should not write on the page until it sets. but my last line shows on my page when it should not. notice anything? i had it working. but i added some things did this and that and now it isnt working. im not sure exactly when it stopped. if you can help...thank you.
heres the line that shows up-- echo "Click <a href='$id/index.php'>here</a> to go to your homepage."; --
and heres the whole script--
/ if submit has not been set, draw the form. /
/ else make new directory and echo 'success'. /
if(!isset($submit)) {
echo"<form align='left' name='xxxx' action='$PHP_SELF' method='get'>
user id: <input type='text' name='id'><br />
password:<input type='password' name='password'><br />
re-enter password:<input type='password' name='passwordconfirm'><br />
<input class='submits' type='submit' name='submit' value='get flashed!'>
</form>";
}
elseif (!@mkdir("$id","")) {
echo("Username is already taken. Please try again.");
} else {
echo("Successfully created account for" . " " . $id . ".");
}
/ set file variable. if copying file to dir is unsuccessful, then echo 'failed'. /
/ else echo homepage link. /
$file = "main.php";
if(@copy($file, "./$id/index.php")) {
echo "Click <a href='$id/index.php'>here</a> to go to your homepage.";
}