if(isset($_POST["register"])) { htmlspecialchars($mail = $_POST["mail"]); htmlspecialchars($username =$_POST["username"]); htmlspecialchars($pass =$_POST["pass"]); htmlspecialchars($pass2 =$_POST["pass2"]); if (empty($mail) || empty($username) || empty($pass) || empty($pass2)) { header("Location:../register.php?bos=var"); }else{ $kullanicivarmi = $vt->prepare("select * from uyeler where username=? || email=?"); $kullanicivarmi-> execute(array($username,$mail)); $varmi = $kullanicivarmi->rowCount(); if ($varmi>0) { header("Location:../register.php?durum=var"); }else{ if ($pass==$pass2) { $pass =md5(htmlspecialchars($_POST["pass"])); $pass2 =md5(htmlspecialchars($_POST["pass2"])); $kullaniciekle= $vt->prepare("insert into uyeler set email=?, username=?, pass=?"); $kullaniciekle->execute(array($mail,$username,$pass)); if ($kullaniciekle) { header("Location:../login.php"); }else{ header("Location:../register.php?durum=olmadi"); } }else{ header("Location:../register.php?sifre=olmadi"); } } } }
Mysql Kayıt Olurken Hata
21
●264
- 21-01-2022, 11:06:46Bu Kod neden mysqle veri göndermiyor kayıt oluyor ama veritabanına kayıt etmiyor bunun sorunu nedir
- 21-01-2022, 11:40:33burakozdmr adlı üyeden alıntı: mesajı görüntüle
$kullaniciekle= $vt->prepare("insert into uyeler ( email, username, pass) VALUES (:email, :username, :pass)");
- 21-01-2022, 11:51:10Alchems adlı üyeden alıntı: mesajı görüntüle
- 21-01-2022, 11:52:32burakozdmr adlı üyeden alıntı: mesajı görüntüle
$kullaniciekle->execute(array($mail,$username,$pass));
- 21-01-2022, 12:34:37Böyle birşey denedim ama yinede olmuyor her türlü yazdım yine olmuyor varmı bunun bir yöntemi ?
$kullaniciekle= $vt->prepare("insert into uyeler ( mail, username, pass) values (NULL, '".$mail."','".$username."', '".$pass."')");
- 21-01-2022, 12:42:39kodu atamadım düzenleyip atıyorum hocam
- 21-01-2022, 12:44:04burakozdmr adlı üyeden alıntı: mesajı görüntüle
- 21-01-2022, 12:52:30
$kullaniciekle= $vt->prepare("insert into uyeler SET email = :email, username = :username pass = :pass); $ekle = $kullaniciekle->execute(array('email'=>$mail, 'username'=>$username, 'pass'=>$pass));