Viewing file: firstUser.php3 (1.75 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
require("include/config.inc.php3");
if((isset($user)) && (isset($email)) && (isset($pass1)))
{
$email2 = strstr($email, "@");
if(strlen($email2)==0)
{
print("The is not a real email address! Try again :)<br><br>");
}
else if($pass1 != $pass2)
{
print("Passwords entered do not match, please use your browsers back buttom and try again<br><br>");
}
else if(strlen($pass1) <= 5 )
{
print("Password has to be at least 6 character long, go back and try again");
}
else
{
require("$mysqlCall");
$pass = crypt($pass1, $user);
$one = 1;
$query = "insert into $users values('', '$user', '$pass', '$one', '$email', '$one', '$one', '$one', '$one', '$one', '$one', '$one', '$one')";
print("$query");
print "<br>";
$mysql_result=mysql_query($query) or die(mysql_error());
if($mysql_result)
{
print("You have now been directly added to the users list<br><br>You should now remove this file.");
}
}
}
else
{
print("Enter the Following Details<br> <form method=\"post\" action=\"firstUser.php3\" >");
print("<table><tr><td>");
print("User Name: </td>");
print("<td><input type=text name='user'></td></tr>");
print("<tr><td>");
print("Email: </td>");
print("<td><input type=text name='email'></td></tr>");
print("<tr><td>");
print("Password: </td>");
print("<td><input type=password name='pass1'></td></tr>");
print("<tr><td>");
print("Repeat Password: </td>");
print("<td><input type=password name='pass2'></td></tr>");
print("<tr><td rowspan=2><input type=submit></td></tr>");
print("</table>");
}
?>
|