Oswin
play.oswinnetwork.com
- Mesajlar
- 423
- En iyi cevaplar
- 0
- Beğeniler
- 187
- Puanları
- 570
Merhabalar,
bu gün kayıt olma sistemini temama entegre etmeye çalışıyordum. Kayıt olma formunu entegre ettim ancak işe yaramıyor. Koda bakar mısınız?
@Berk
bu gün kayıt olma sistemini temama entegre etmeye çalışıyordum. Kayıt olma formunu entegre ettim ancak işe yaramıyor. Koda bakar mısınız?
PHP:
<?php
if($_SESSION['giris'] == "1"){
header('Location: kayit-ol.php');
}
$sql = mysql_query("SELECT * FROM authme WHERE ip='".$_SERVER['REMOTE_ADDR']."'");
if(mysql_num_rows($sql) < 1){
if(isset($_POST['kayit'])){
$sql = mysql_query("SELECT * FROM authme WHERE username='".clearMethod($_POST['kull'])."'");
if(($_POST['kull'] == "") or ($_POST['pass'] == "") or ($_POST['email'] == "")){
echo "<font color=red>Lütfen Boş Alan Bırakmayın</font>";
echo "<font color=red>Böyle Bir Kullanıcı Mevcut</font>";
}else{
$sql = mysql_query("INSERT INTO authme (`username`, `password`, `ip`, `lastlogin`, `x`, `y`, `z`, `world`, `email`) VALUES ('".clearMethod($_POST['kull'])."', '".md5($_POST['pass'])."', '".$_SERVER['REMOTE_ADDR']."', NULL, '0', '0', '0', 'world', '".clearMethod($_POST['email'])."');");
echo "<font color=green>Başarıyla Kayıt Oldunuz</font>";
echo mysql_error();
}
}
echo "<form action='' method=POST><table border=0><table>
<input type=text class='form-control' placeholder='Nickname' name='kull' maxlength=16>
</tr>
<tr>
<br>
<input type=password class='form-control' placeholder='Şifre' name='pass' maxlength=16>
</tr>
<tr>
<br>
<input type=text placeholder='E-Mail' class='form-control' name='email' maxlength=32>
</tr>
<tr>
<br>
<input type=submit class='btn' name=kayit value='Kayıt Ol'>
</table></form>";
}else{
echo "<font color=red><center>Bir Kullanıcı Maximum 1 Adet Üyelik Alabilir.</center></font>";
}
?>