pdo查询成功运行在localhost上但不在托管上运行

时间:2017-07-16 08:40:00

标签: php pdo

我的代码低于它在localhost上成功运行但未在托管服务器上运行。我尝试了很多时间来解决但我无法解决它

<?php
include ('dbconfig.php');

$page = isset($_GET['p'])?$_GET['p']:'';


if($page =='add'){



    $email_id = $_POST['email_id'];
    $customer_name = $_POST['customer_name'];
    $mobile_no = $_POST['mobile_no'];
    $address = $_POST['adress'];
    $city = $_POST['city'];
    $state = $_POST['state'];
    $country = $_POST['country'];
    $no_of_jurney_person = $_POST['no_of_jurney_person'];
    $j_from = $_POST['j_from'];
    $j_to = $_POST['j_to'];
    $date_of_jurney = $_POST['date_of_jurney'];
    $return_date = $_POST['return_date'];

    $stmt=$DBcon->prepare("insert into anil values('',?,?,?,?,?,?,?,?,?,?,?,?)");

    $stmt->bindParam(1,$email_id);
    $stmt->bindParam(2,$customer_name);
    $stmt->bindParam(3,$mobile_no);
    $stmt->bindParam(4,$address);
    $stmt->bindParam(5,$city);
    $stmt->bindParam(6,$state);
    $stmt->bindParam(7,$country);
    $stmt->bindParam(8,$no_of_jurney_person);
    $stmt->bindParam(9,$j_from);
    $stmt->bindParam(10,$j_to);
    $stmt->bindParam(11,$date_of_jurney);
    $stmt->bindParam(12,$return_date);


    if($stmt->execute()){


        echo "Mr. Or Mrs ".$customer_name;

        echo "Thanks for inquiry. Our representative will call you soon";
    }
    else{

        echo "Something went wrong. Please try again later";


}

0 个答案:

没有答案