<br><br>
<center>
<?php
mysql_select_db("$rdb");
$email = get_magic_quotes_gpc() ? $_POST['email'] : mysql_escape_string ($_POST['email']);
$user= get_magic_quotes_gpc() ? $_POST['user'] : mysql_escape_string($_POST['user']);
$pass= get_magic_quotes_gpc() ? $_POST['pass'] : mysql_escape_string($_POST['pass']);
if (empty($_POST['user']) or empty($_POST['pass']) or empty($_POST['email'])){
$cont='Не заполнены все данные.';
}
elseif(!preg_match("/^[a-zA-Z0-9]+$/i", $pass)){
$cont='Пароль должен состоять только из букв и цифр.';
}
elseif(!preg_match("/[0-9a-z_]+@[0-9a-z_^\.]+\.[a-z]{2,3}/i", $email)){
$cont='Не правильный email.';
}
else
{
$cont='Создание аккаунта успешно завершено!';
$q = mysql_query("SELECT * FROM account
WHERE username
= '$user' ");
$q2 = mysql_num_rows($q);
if($q2 == 0){$query = mysql_query("INSERT INTO account
(username
, password
, email
) VALUES ('$user', SHA1(CONCAT(UPPER('$user'),':',UPPER('$pass'))), '$email')") ;
}
}
mysql_select_db("$db_name");
?>
<form name="form1" method="post">
Логин/Username:<br>
<input type="text" name="user" id="user"><br>
Пароль/Password:<br>
<input type="password" name="pass" id="pass"><br>
E-Mail: <br>
<input type="text" name="email" id="email"><br>
<br><font color=red /><b /><?php print $cont ?><br><br>
<input type="submit" name="Submit" value="Зарегистрировать">
<input type="reset" name="Clear" value="Очистить">
</form>
</center>
Notice: Undefined index: email in C:\xampp\htdocs\viewpage.php(34) : eval()'d code on line 6
Notice: Undefined index: user in C:\xampp\htdocs\viewpage.php(34) : eval()'d code on line 7
Notice: Undefined index: pass in C:\xampp\htdocs\viewpage.php(34) : eval()'d code on line 8
Category Forum
General DiscussionLabels
None yet
Statistics
1 participant
Notifications
You are not receiving notifications from this thread.
Related Questions