<?php
if(isset($_POST['c_s'])) {
$c_l = (preg_match("/^[A-Z0-9._%-]+@[A-Z0-9][A-Z0-9.-]{0,61}[A-Z0-9]\.[A-Z]{2,6}$/i", $_POST['c_l'])) ? mysql_real_escape_string($_POST['c_l']) : header("Location: register.php");
if($_POST['c_p'] == $_POST['c_pa']) { $c_p = sha1($_POST['c_p']); } else { header("Location: register.php"); }
require_once("configs.php");
$sql = "INSERT INTO " . TABLE_PREFIX . "users (user_id, user_log, user_psw) VALUES (NULL, '{$c_l}', '{$c_p}')";
if(mysql_query($sql, $link_identifier)) {
echo("Account Created.");
exit();
} else {
die("Error, Your email is already in use.");
exit();
}
} else {
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF