- Nov 28, 2000
- 2,224
- 0
- 0
I have a problem with the script i made
I get a parse error. I seem to have closed all my brackets, and still i get the error. Could someone look over the script and tell me what i did wrong? THANKS!!!!!
<?
$file_directory = 'c:\filedir';
$file_contents = file("$file_directory\\filedir.INI");
sort($file_contents);
$sizeof = count($file_contents);
function randomPassword () {
$length ="8";
$possible = '123456789' .
'ABCDEFGHJKLMNPQRSTUVWXYZ';
$pwd ="";
while (pwdlen($pwd) < $length) {
$pwd.=substr($possible, (rand() % pwdlen($possible)),1);
}
}
if(!file_exists("c:\signup\$email"))
{
print("<b>$email</b> already exists, please choose another.");
}elseif (!file_exists("c:\www\members\$user"))
{
print("<b>$user</b> already exists, please choose another.");
} else {
if(mkdir("c:\signup\\$email", 0707))
if(mkdir("c:\www\members\\$user", 0707))
if($SERVU= fopen("$file_directory\\filedir.INI", "a"))
if($userlist = fopen("c:\www\dittohost\users.html", "a"))
if($accounts = fopen("c:\MemberAccounts\members.txt", "a"))
fputs($SERVU,
"
Password=$pwd
");
fclose($SERVU;
fputs($userlist,
"
<b>[$user]</b>
http://www.dittohost.com/members//$user
E-mail Address: $email
Name: $name
Secret question: $question
Secret answer: $answer
Heard about dittohost from: $dittohost
Details: $details
ICQ: $icq
");
fclose($userlist);
fputs($accounts,
"
USER=$user
Password=$pwd
E-mail Address: $email
Name: $name
Secret question: $question
Secret answer: $answer
Heard about dittohost from: $dittohost
Details: $details
ICQ: $icq
");
fclose($accounts);
if(mail("$email", "Account Signup Information", "Thanks for choosing dittohost. The signup password is as follows: $pwd Dont forget it.
", "From: [email]Administrator@dittohost.com[/email]\n"))
print("Successfully added <b>$user</b> to database, your password has been emailed to you.");
}
?>
<?
$file_directory = 'c:\filedir';
$file_contents = file("$file_directory\\filedir.INI");
sort($file_contents);
$sizeof = count($file_contents);
function randomPassword () {
$length ="8";
$possible = '123456789' .
'ABCDEFGHJKLMNPQRSTUVWXYZ';
$pwd ="";
while (pwdlen($pwd) < $length) {
$pwd.=substr($possible, (rand() % pwdlen($possible)),1);
}
}
if(!file_exists("c:\signup\$email"))
{
print("<b>$email</b> already exists, please choose another.");
}elseif (!file_exists("c:\www\members\$user"))
{
print("<b>$user</b> already exists, please choose another.");
} else {
if(mkdir("c:\signup\\$email", 0707))
if(mkdir("c:\www\members\\$user", 0707))
if($SERVU= fopen("$file_directory\\filedir.INI", "a"))
if($userlist = fopen("c:\www\dittohost\users.html", "a"))
if($accounts = fopen("c:\MemberAccounts\members.txt", "a"))
fputs($SERVU,
"
Password=$pwd
");
fclose($SERVU;
fputs($userlist,
"
<b>[$user]</b>
http://www.dittohost.com/members//$user
E-mail Address: $email
Name: $name
Secret question: $question
Secret answer: $answer
Heard about dittohost from: $dittohost
Details: $details
ICQ: $icq
");
fclose($userlist);
fputs($accounts,
"
USER=$user
Password=$pwd
E-mail Address: $email
Name: $name
Secret question: $question
Secret answer: $answer
Heard about dittohost from: $dittohost
Details: $details
ICQ: $icq
");
fclose($accounts);
if(mail("$email", "Account Signup Information", "Thanks for choosing dittohost. The signup password is as follows: $pwd Dont forget it.
", "From: [email]Administrator@dittohost.com[/email]\n"))
print("Successfully added <b>$user</b> to database, your password has been emailed to you.");
}
?>
