无法将数据发送到mysql数据库

时间:2017-06-20 06:44:16

标签: php

我的表单没有向mysql数据库提交数据。表单提交,但不会返回错误。查看phpMyAdmin时,没有记录。我已经调整了一百万次而没有运气。第二组眼睛可以告诉我我做错了吗?

我的PHP代码是:

$total_pay=$_POST['amount'];
$title=$_POST['title_name'];
$fname=$_POST['firstname'];
$age=$_POST['age'];
$institution=$_POST['institution'];
$designation=$_POST['designation'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$pin=$_POST['pin'];
$country=$_POST['country'];
$phone_off=$_POST['phone_off'];
$phone_res=$_POST['phone_res'];
$phone=$_POST['phone'];
$email=$_POST['email'];
$gender=$_POST['gender'];
$dite=$_POST['dite'];
$hotel_name=$_POST['hotel_name'];
$package=$_POST['package'];
$none="none";

$wc_room_fee1=$_POST['wc_room_fee1'];
$wc_bed_fee1=$_POST['wc_bed_fee1'];
$wc_cme_fee1=$_POST['wc_cme_fee1'];
$wc_banquet_fee1=$_POST['wc_banquet_fee1'];
$wc_workshop_fee1=$_POST['wc_workshop_fee1'];
$wc_incident_fee1=$_POST['wc_incident_fee1'];
$reg_fee1=$_POST['reg_fee1'];
$accomPrice1=$_POST['accomPrice1'];
$date=date("d-m-Y");
date_default_timezone_set("Asia/Kolkata");
$time=date("H:i:s");
$o_date=$date." ".$time;
$ioa_membership_no=$_POST['ioa_membership_no'];

$atitle=$_POST['title1'];
$full_name1=$_POST['full_name1'];
$age1=$_POST['age1'];
$gender1=$_POST['gender1'];
$dite1=$_POST['dite1'];
$relationship=$_POST['relationship'];
$ac_details="Title: $atitle, Name: $full_name1, Age: $age1, Gender: $gender1, Diet: $dite1, Relationship: $relationship";

$m_passport_no=$_POST['m_passport_no'];
$m_fathername=$_POST['m_fathername'];
$m_place=$_POST['m_place'];
$m_dateofissue=$_POST['m_dateofissue'];
$m_dateofexpiry=$_POST['m_dateofexpiry'];
$m_dateofbirth=$_POST['m_dateofbirth'];
$m_placeofbirth=$_POST['m_placeofbirth'];
$m_nationality=$_POST['m_nationality'];


$m_passport_no_01=$_POST['m_passport_no_01'];
$m_fathername_01=$_POST['m_fathername_01'];
$m_place_01=$_POST['m_place_01'];
$m_dateofissu_01e=$_POST['m_dateofissue_01'];
$m_dateofexpiry_01=$_POST['m_dateofexpiry_01'];
$m_dateofbirth_01=$_POST['m_dateofbirth_01'];
$m_placeofbirth_01=$_POST['m_placeofbirth_01'];
$m_nationality_01=$_POST['m_nationality_01'];

$mydata="insert into wp_hdfc_payment(name, age, institution, designation, address, city, state, pin, country, phone_off, phone_res, fax, phone, email, gender, dite, ioa_membership_no, hotel_name, package, extra_room, extra_bed, accompning_details, cme_fee, banquet_fee, workshop_fee, workshop_name, incident_fee, registration_fee, accomp_fee, total_amount, ResErrorText, ResPaymentId, ResErrorNo, ResResult, ResPostdate, ResTransId, ResAuth, ResAVR, ResRef, Resudf1,  Resudf2, Resudf3, Resudf4, Resudf5, payment, response_ip, order_date) 
  values('$fname', '$age', '$institution', '$designation', '$address', '$city', '$state', '$pin', '$country', '$phone_off', '$phone_res', '$none', '$phone', '$email', '$gender', '$dite', '$ioa_membership_no', '$hotel_name', '$package', '$wc_room_fee1', '$wc_bed_fee1', '$ac_details', '$wc_cme_fee1', '$wc_banquet_fee1', '$wc_workshop_fee1', '$none', '$wc_incident_fee1', '$reg_fee1', '$accomPrice1', '$total_pay', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', '$none', 'Pay', '$none', '$o_date')";

mysqli_query($con, $mydata);

echo mysqli_error();

0 个答案:

没有答案