Вот собственно код.Нет через скрипт записываютя данные в другие таблицы.А вот в таблицу users не записываются-код ниже->
<?php
$ip = getenv("REMOTE_ADDR");
$ip = htmlspecialchars(substr($ip,0,15), ENT_QUOTES);
$errorlogin = "<p class=\"er\">Вы уже зарегестрированны!</p>";
$ip_number = sprintf("%u", ip2long($ip));
$country_query = "SELECT `cc` FROM `geoip_db` WHERE `start`<=$ip_number AND `end`>=$ip_number";
$country_exec = mysql_query($country_query);
$ccode_array = @mysql_fetch_array($country_exec);
$country_code = $ccode_array['cc'];
if ($country_code)
{
$flag = '/images/flag/'.strtolower($country_code).'.png';
}
else
{
$flag = '/images/flag/not.png';
}
$captcha = '/cap/index.php?'.session_name().'='. session_id().'';
if(!$login) {
if($_GET['action'] == "save") {
$ulogin = htmlspecialchars($_POST['ulogin'], ENT_QUOTES);
$pass = $_POST['pass'];
$repass = $_POST['repass'];
$email = htmlspecialchars($_POST['email'], ENT_QUOTES);
$wmz = htmlspecialchars($_POST['wmz'], ENT_QUOTES);
$code = htmlspecialchars($_POST["code"], ENT_QUOTES);
$cap = (isset($_SESSION['captcha_keystring']) && strtolower($_SESSION['captcha_keystring']) == strtolower($_POST['keystring']));
if(!$ulogin || !$pass || !$repass || !$email ) {
$error = "<p class=\"er\"><b>".$lng['er_all_input']."</b></p>";
} elseif(strlen($ulogin) > 20 || strlen($ulogin) < 3) {
$error = "<p class=\"er\"><b>".$lng['er_login_symbols']."</b></p>";
} elseif(!intval($_POST['yes'])) {
$error = "<p class=\"er\"><b>".$lng['er_law']."</b></p>";
} elseif($pass != $repass) {
$error = "<p class=\"er\"><b>".$lng['er_pass_repass']."</b></p>";
} elseif(strlen($email) > 30) {
$error = "<p class=\"er\"><b>".$lng['er_mail_symbols']."</b></p>";
} elseif(!$cap) {
$error = "<p class=\"er\"><b>Вы ввели неправельно каптчу</b></p>";
} elseif(strlen($wmz) != 13 && $wmz) {
$error = "<p class=\"er\"><b>".$lng['er_purse_symbols']."</b></p>";
} elseif(substr($wmz,0,1) != $cfgPurse && $wmz) {
$error = "<p class=\"er\"><b>".$lng['er_purse_symbol']." <u>".$cfgPurse."</b></u></p>";
} elseif(mysql_num_rows(mysql_query("SELECT wmz FROM users WHERE wmz = '".$wmz."'"))) {
$error = "<p class=\"er\"><b>".$lng['er_purse_db']."!</b></p>";
} elseif(!preg_match("/^[a-z0-9_.-]{1,20}@(([a-z0-9-]+\.)+(com|net|org|mil|edu|gov|arpa|info|biz|[a-z]{2})|[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})$/is", $email)) {
$error = "<p class=\"er\"><b>".$lng['er_mail']."</b></p>";
} elseif(mysql_num_rows(mysql_query("SELECT login FROM users WHERE login = '".$ulogin."'"))) {
$error = "<p class=\"er\"><b>".$lng['er_login_db']."</b></p>";
} elseif(mysql_num_rows(mysql_query("SELECT mail FROM users WHERE mail = '".$email."'"))) {
$error = "<p class=\"er\"><b>".$lng['er_mail_db']."!</b></p>";
} else {
$time = time();
if($referal) { $ref_id = intval($referal); } else { $ref_id = 0; }
$sql = "INSERT INTO users (login, pass, mail, wmz, go_time, ip, ref_id, reg_time) VALUES ('".$ulogin."', '".$pass."', '".$email."', '".$wmz."', '".$time."', '".$ip."', '".$ref_id."', '".$time."')";
mysql_query($sql);
$lid = mysql_insert_id();
$subject = $lng['er_reg_ok'];
$headers = "From: ".$adminmail."\n";
$headers .= "Reply-to: ".$adminmail."\n";
$headers .= "X-Sender: < http://".$cfgURL." >\n";
$headers .= "Content-Type: text/html; charset=utf-8\n";
$text = "Здравствуйте <b>".$ulogin."!</b><br />Поздравляем Вас с успешной регистрацией в сервисе <a href=\"http://".$cfgURL."/\" target=\"_blank\">http://".$cfgURL."</a><br />Ваш Логин в системе: <b>".$ulogin."</b><br />Ваш пароль: <b>".$repass."</b><br /><br />Ваша реферальная ссылка: <a href=\"http://".$cfgURL."/?ref=".$lid."\" target=\"_blank\">http://".$cfgURL."/?ref=".$lid."</a><br />С Уважением к Вам, администрация проекта ".$cfgURL;
mail($email, $subject, $text, $headers);
$ulogin = "";
$pass = "";
$repass = "";
$email = "";
$wmz = "";
$error = 1;
}
}
if($error == 1) {
print "<p class=\"erok\"><b>".$lng['er_reg_ok']."</b></p>";
include "../lib/auth.php";
} else {
print $error;
?>
<table>
<tr>
<td width="620">
<form action="?action=save" method="post">
<table align="left" width="600" border="0" cellpadding="2" cellspacing="14" class="front-signup" style="border-collapse: separate;">
<tr>
<td align="right"><b>Логин:</b><font color="red">*</font></td>
<td align="left"><input type="text" name="ulogin" value="<?php print $ulogin; ?>" size="30" maxlength="20" /></td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td align="right"><b>Пароль:</b><font color="red">*</font></td><td align="left"><input type="password" name="pass" size="30" maxlength="20" /></td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td align="right"><b>Подтвердите пароль:</b><font color="red">*</font></td><td align="left"><input type="password" name="repass" size="30" maxlength="20" /></td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td align="right"><b>Email:</b><font color="red">*</font></td><td align="left"><input type="text" name="email" value="<?php print $email; ?>" size="30" maxlength="30" /></td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td align="right"><b>WM<?php print $cfgPurse; ?>- Кошелёк:</b><font color="red">*</font></td><td align="left"><input type="text" name="wmz" value="<?php print $wmz; ?>" size="30" maxlength="13" /></td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td align="right"><b>Ваш IP Адрес:</b></td>
<td align="left"><b><?php print $ip; ?></b> <img src="<?php print $flag; ?>"></td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td align="right"><b>Введите проверочный код:</b><font color="red">*</font></td>
<td align="left">
<input type="text" size="5" maxlength="6" name="keystring">
<img id="myimage" src='<?php print $captcha; ?>' />
<a href="#" onclick="document.getElementById('myimage').src='<?php print $captcha; ?>'+Math.random(); return false;"> <img id="myimage" src='/images/refresh.png' width="25"/></a>
</td>
</tr>
<tr>
<td colspan="2"><hr/>
</td>
</tr>
<tr>
<td colspan="2" align="center"> <input class="check" type="checkbox" name="yes" value="1" /> <a href="/specification/" target="_blank"> <b>Я согласен с правилами системы</b></a><font color="red">*</font></td>
</tr>
<tr><td colspan="2">
<center>
<font color="red"><b>*</b></font> - Поля обязательные для заполнения
</center>
<div style="margin-top: 15px; margin-left: 40%;"><input id="prb-distanse" class="prb-mbut" type='submit' name='submit' value='<?php print $lng['register']; ?>' /></div>
</td></tr>
</table>
</form>
</td>
<td>
<table>
<tr>
<td>
<div class="sidebar" style="text-align:left;height: 663px;">
<?php
print $body;
?>
</div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php };
} else {
print $errorlogin; }?>