<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Форум PHP-MyAdmin.RU &mdash; php скрипты регистрации]]></title>
	<link rel="self" href="https://forum.php-myadmin.ru/extern.php?action=feed&amp;tid=1807&amp;type=atom" />
	<updated>2010-06-30T11:18:33Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.php-myadmin.ru/viewtopic.php?id=1807</id>
		<entry>
			<title type="html"><![CDATA[Re: php скрипты регистрации]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=12576#p12576" />
			<content type="html"><![CDATA[<p>Огромное спасибо... я понял принцип ошибки... и у меня все получилось... все работает!!!</p>]]></content>
			<author>
				<name><![CDATA[nikomar]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2921</uri>
			</author>
			<updated>2010-06-30T11:18:33Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=12576#p12576</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: php скрипты регистрации]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=12575#p12575" />
			<content type="html"><![CDATA[<p>Поправьте регулярное выражение, чтобы принимались доменные зоны из двух символов, к примеру [mono].ru[/mono].<br />if(!preg_match(&#039;/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])*(\.([a-z0-9])([a-z0-9])+)*$/i&#039;,$usermail)) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Wrong email!&lt;/p&gt;&#039;;</p>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-06-30T09:33:28Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=12575#p12575</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: php скрипты регистрации]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=12573#p12573" />
			<content type="html"><![CDATA[<p>Добрый день...<br />Изменил, но все равно пишет &quot;Wrong emai&quot;... <br />Может быть тут проблема:</p><p>if(!preg_match(&#039;/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])*(\.([a-z0-9])([-a-z0-9_-])([a-z0-9])+)*$/i&#039;,$usermail)) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Wrong email!&lt;/p&gt;&#039;;</p>]]></content>
			<author>
				<name><![CDATA[nikomar]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2921</uri>
			</author>
			<updated>2010-06-30T09:21:27Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=12573#p12573</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: php скрипты регистрации]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=12557#p12557" />
			<content type="html"><![CDATA[<p><strong>nikomar</strong><br />Перепишите все переменные получаемые из формы в виде элементов массива POST.<br />$usermail - должна выглядеть - $_POST[&#039;usermail&#039;]</p>]]></content>
			<author>
				<name><![CDATA[Hanut]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=181</uri>
			</author>
			<updated>2010-06-29T18:55:03Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=12557#p12557</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[php скрипты регистрации]]></title>
			<link rel="alternate" href="https://forum.php-myadmin.ru/viewtopic.php?pid=12550#p12550" />
			<content type="html"><![CDATA[<p>Помогите разобраться... <br />Есть скрипт регистрации и авторизации пользователей на сайте, но при регистрации все время выдает &quot;Неправильная электронная почта!&quot;... <br />Не могу найти ошибку прописки в скрипте:</p><p>&lt;?<br />include($_SERVER[&quot;DOCUMENT_ROOT&quot;] . &quot;/auth/incdir/conf.php&quot;);<br />if(empty($_COOKIE[&quot;user&quot;]) &amp;&amp; isset($go_reg))<br />{<br />&nbsp; &nbsp; $RegForm = true;<br />&nbsp; &nbsp; $sel_query = mysql_query(&quot;SELECT * FROM users WHERE umail=&#039;&quot;. $usermail .&quot;&#039;&quot;);<br />&nbsp; &nbsp; if(mysql_num_rows($sel_query) &gt; 0) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;This email is allready used!&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; if(!preg_match(&#039;/^([a-z0-9])(([-a-z0-9._])*([a-z0-9]))*\@([a-z0-9])*(\.([a-z0-9])([-a-z0-9_-])([a-z0-9])+)*$/i&#039;,$usermail)) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Wrong email!&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; if(!preg_match(&#039;/[1-9|a-z|A-Z]{3,20}/&#039;,$login)) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Wrong login! Only alphanumeric characters allowed, from 3 to 20 characters.&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; if($pw != $rpw) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Passwords do not match.&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; if(strlen($pw) &lt; 6) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Wrong password! Not less than 6 symbols required.&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; if($_SESSION[&quot;secure&quot;] != $sec_code) $err_mess[] = &#039;&lt;p class=&quot;er1&quot;&gt;Wrong security code.&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; <br />&nbsp; &nbsp; if(!$err_mess)<br />&nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; $mdpw = md5($pw);<br />&nbsp; &nbsp; &nbsp; &nbsp; $query = &quot;INSERT INTO users (ulogin,upw,umail,level) VALUES (&#039;&quot;. $login .&quot;&#039;,&#039;&quot;. $mdpw .&quot;&#039;,&#039;&quot;. $usermail .&quot;&#039;,&#039;0&#039;)&quot;;<br />&nbsp; &nbsp; &nbsp; &nbsp; $result = mysql_query($query)or die(MDIE . &quot; &lt;h3&gt;&quot;. mysql_error() .&quot;&lt;/h3&gt;&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; if($result)<br />&nbsp; &nbsp; &nbsp; &nbsp; {<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $RegForm = false;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $mess[] = &#039;&lt;p class=&quot;ok1&quot;&gt;Thanks for your registration!&lt;br/&gt; Verification code was emailed to you!&lt;/p&gt;&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $MailMessage = &#039;Your activation link: &lt;a href=&quot;&#039; . DOMAIN . &#039;/funcdir/activator.php?a=&#039; . md5($usermail) .&#039;&quot;&gt;&#039; . DOMAIN . &#039;/funcdir/activator.php?a=&#039; . md5($usermail) .&#039;&lt;/a&gt;&#039;;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; send_mail($usermail,&quot;Activation code&quot;,$MailMessage,&quot;-factivation@akotenko.com&quot;);<br />&nbsp; &nbsp; &nbsp; &nbsp; }<br />&nbsp; &nbsp; }<br />}<br />elseif(empty($_COOKIE[&quot;user&quot;]))<br />{<br />&nbsp; &nbsp; $RegForm = true;<br />}<br />else<br />{<br />&nbsp; &nbsp; header(&quot;Location: &quot; . DOMAIN);<br />}</p><p>include(INCDIR . &quot;/header.php&quot;);<br />printmess($err_mess);<br />printmess($mess);<br />if($RegForm == true)<br />{<br />&nbsp; &nbsp; echo &#039;<br />&nbsp; &nbsp; &lt;form method=&quot;post&quot; action=&quot;&#039;. DOMAIN .&#039;/funcdir/reg.php&quot;&gt;<br />&nbsp; &nbsp; &lt;table class=&quot;s1&quot; bgcolor=&quot;#FFFFFF&quot;&gt;<br />&nbsp; &nbsp; &lt;tr bgcolor=&quot;#EEEEEE&quot;&gt;<br />&nbsp; &nbsp; &lt;td&gt;Email&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;25&quot; name=&quot;usermail&quot; /&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr bgcolor=&quot;#EEEEEE&quot;&gt;<br />&nbsp; &nbsp; &lt;td&gt;Login&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;25&quot; name=&quot;login&quot; /&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr bgcolor=&quot;#EEEEEE&quot;&gt;<br />&nbsp; &nbsp; &lt;td&gt;Password&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;password&quot; size=&quot;25&quot; name=&quot;pw&quot; /&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr bgcolor=&quot;#EEEEEE&quot;&gt;<br />&nbsp; &nbsp; &lt;td&gt;Retype Password&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;password&quot; size=&quot;25&quot; name=&quot;rpw&quot; /&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr bgcolor=&quot;#EEEEEE&quot;&gt;<br />&nbsp; &nbsp; &lt;td&gt;Security code&lt;/td&gt;&lt;td&gt;&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;span onclick=&quot;refresh_cap(\&#039;cap\&#039;);&quot; class=&quot;ref&quot;&gt;&lt;u&gt;Refresh&lt;/u&gt;&lt;/span&gt;&lt;br/&gt;&lt;img src=&quot;&#039;. DOMAIN .&#039;/funcdir/cap.php&quot; id=&quot;cap&quot; border=&quot;0&quot; /&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=&quot;text&quot; size=&quot;5&quot; name=&quot;sec_code&quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;tr&gt;<br />&nbsp; &nbsp; &lt;td&gt;&lt;a href=&quot;&#039;. DOMAIN .&#039;/funcdir/login.php&quot;&gt;Login&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href=&quot;&#039;. DOMAIN .&#039;/funcdir/lostpw.php&quot;&gt;Lost Password?&lt;/a&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;&nbsp; &nbsp; <br />&nbsp; &nbsp; &lt;tr bgcolor=&quot;#EEEEEE&quot;&gt;<br />&nbsp; &nbsp; &lt;td colspan=&quot;2&quot;&gt;&lt;input type=&quot;submit&quot; value=&quot;Register&quot; name=&quot;go_reg&quot; class=&quot;sub1&quot; /&gt;&lt;/td&gt;<br />&nbsp; &nbsp; &lt;/tr&gt;<br />&nbsp; &nbsp; &lt;/table&gt;<br />&nbsp; &nbsp; &lt;/form&gt;&nbsp; &nbsp; <br />&nbsp; &nbsp; &#039;;<br />}<br />include(INCDIR . &quot;/footer.php&quot;);<br />?&gt;</p>]]></content>
			<author>
				<name><![CDATA[nikomar]]></name>
				<uri>https://forum.php-myadmin.ru/profile.php?id=2921</uri>
			</author>
			<updated>2010-06-29T14:25:12Z</updated>
			<id>https://forum.php-myadmin.ru/viewtopic.php?pid=12550#p12550</id>
		</entry>
</feed>
