CODE
Warning: fopen() [function.fopen]: Unable to access ./test/siteinfo.txt in /www/vndv.com/b/d/c/bdcadmin/htdocs/signupen.php on line 8
Warning: fopen(./test/siteinfo.txt) [function.fopen]: failed to open stream: No such file or directory in /www/vndv.com/b/d/c/bdcadmin/htdocs/signupen.php on line 8
can't open file CHMOD it to 777
Warning: fopen(./test/siteinfo.txt) [function.fopen]: failed to open stream: No such file or directory in /www/vndv.com/b/d/c/bdcadmin/htdocs/signupen.php on line 8
can't open file CHMOD it to 777
I've tried getting it right for a hour now and still working on it but I keep getting errors, here's my PHP code:
CODE
<?php
if (file_exists("./$_REQUEST[username]/")) {
echo ' <img src="BDC.bmp"/> <br> <br>';
echo '<h1>That Name Already Exists! Please Try Again by Hitting the Back Button</h1>';
} else {
mkdir("$_REQUEST[username]");
$myFile = "./$_REQUEST[username]/userinfo.txt";
$fh = fopen($myFile, 'w') or die("can't open file CHMOD it to 777");
$stringData = "password: $_REQUEST[passname] userabout: $_REQUEST[aboutuser]";
fwrite($fh, $stringData);
fclose($fh);
$myFile2 = "./$_REQUEST[username]/password.html";
$fh2 = fopen($myFile2, 'w') or die("can't open file CHMOD it to 777");
$stringData2 = " <img src=BDC.bmp/> <br> <br> Pending Account...<img src=lock.png />";
fwrite($fh2, $stringData2);
fclose($fh2);
echo ' <img src=BDC.bmp/> <br> <br> Signup Complete! <img src=check.png/> <br> View Account <a href=http://bdcadmin.vndv.com/$_REQUEST[username]/password.html>Here<a/>';
}
?>
if (file_exists("./$_REQUEST[username]/")) {
echo ' <img src="BDC.bmp"/> <br> <br>';
echo '<h1>That Name Already Exists! Please Try Again by Hitting the Back Button</h1>';
} else {
mkdir("$_REQUEST[username]");
$myFile = "./$_REQUEST[username]/userinfo.txt";
$fh = fopen($myFile, 'w') or die("can't open file CHMOD it to 777");
$stringData = "password: $_REQUEST[passname] userabout: $_REQUEST[aboutuser]";
fwrite($fh, $stringData);
fclose($fh);
$myFile2 = "./$_REQUEST[username]/password.html";
$fh2 = fopen($myFile2, 'w') or die("can't open file CHMOD it to 777");
$stringData2 = " <img src=BDC.bmp/> <br> <br> Pending Account...<img src=lock.png />";
fwrite($fh2, $stringData2);
fclose($fh2);
echo ' <img src=BDC.bmp/> <br> <br> Signup Complete! <img src=check.png/> <br> View Account <a href=http://bdcadmin.vndv.com/$_REQUEST[username]/password.html>Here<a/>';
}
?>
