زینب فاطمی
دوشنبه 12 تیر 1396, 15:10 عصر
سلام
اطلاعات زیر توی دیتابیس ثبت نمیشه چطور علتش رو پیدا کنم؟
session_start();
include('injection.php');
if(isset($_POST['captcha'])){
if($_POST['captcha']==$_SESSION['captcha']){
$username=$_POST['namekarbar'];
$username=check($username);
$mail=$_POST['mail'];
$mail=check($mail);
if(isset($_POST['jensiat'])){ $jensiat=$_POST['jensiat'];} else{$jensiat=2;}
$password=$_POST['password'];
$password=check($password);
$password=md5($password);
$mobile=$_POST['mobile'];
$mobile=check($mobile);
$tel=$_POST['tel'];
$tel=check($tel);
$ostan=$_POST['ostan'];
$ostan=check($ostan);
$shahr=$_POST['shahr'];
$shahr=check($shahr);
$shahr=intval($shahr);
$codeposti=$_POST['codeposti'];
$codeposti=check($codeposti);
$adres=$_POST['adres'];
$adres=check($adres);
$fileadres=$_POST['fileadres'];
if(isset($_POST['khabarnameemail'])){$khabarnameemail=1;}else{$khabarnameemail=0;}
if(isset($_POST['khabarnamesms'])){$khabarnamesms=1;}else{$khabarnamesms=0;}
$date='';
include('config.inc.php');
$sql="insert into person (email,mobile,username,jensiat,password,tel,ostan, shahr,codeposti,address,khabaremail,khabarsms,date ,fileadres) values ('$mail','$mobile','$username','$jensiat','$passwo rd','$tel','$ostan','$shahr','$codeposti','$adres' ,'$khabarnameemail','$khabarnamesms','$date','$fil eadres') ";
$stmt=$db->prepare($sql);
$stmt->execute();
}
else{}
}
else{}
اطلاعات زیر توی دیتابیس ثبت نمیشه چطور علتش رو پیدا کنم؟
session_start();
include('injection.php');
if(isset($_POST['captcha'])){
if($_POST['captcha']==$_SESSION['captcha']){
$username=$_POST['namekarbar'];
$username=check($username);
$mail=$_POST['mail'];
$mail=check($mail);
if(isset($_POST['jensiat'])){ $jensiat=$_POST['jensiat'];} else{$jensiat=2;}
$password=$_POST['password'];
$password=check($password);
$password=md5($password);
$mobile=$_POST['mobile'];
$mobile=check($mobile);
$tel=$_POST['tel'];
$tel=check($tel);
$ostan=$_POST['ostan'];
$ostan=check($ostan);
$shahr=$_POST['shahr'];
$shahr=check($shahr);
$shahr=intval($shahr);
$codeposti=$_POST['codeposti'];
$codeposti=check($codeposti);
$adres=$_POST['adres'];
$adres=check($adres);
$fileadres=$_POST['fileadres'];
if(isset($_POST['khabarnameemail'])){$khabarnameemail=1;}else{$khabarnameemail=0;}
if(isset($_POST['khabarnamesms'])){$khabarnamesms=1;}else{$khabarnamesms=0;}
$date='';
include('config.inc.php');
$sql="insert into person (email,mobile,username,jensiat,password,tel,ostan, shahr,codeposti,address,khabaremail,khabarsms,date ,fileadres) values ('$mail','$mobile','$username','$jensiat','$passwo rd','$tel','$ostan','$shahr','$codeposti','$adres' ,'$khabarnameemail','$khabarnamesms','$date','$fil eadres') ";
$stmt=$db->prepare($sql);
$stmt->execute();
}
else{}
}
else{}