0

I am trying to insert record in database. But I got an error as like

Fatal error: Cannot pass parameter 2 by reference.

Here is my code please suggest my where are I am wrong.

$tid_user_details=900000007;
            $did=60000003;
            $AcDate=201802170001;
            $category=11;
            $subj="hi just test";
            $dt=1518847118;

            $response=0;
            $alloted_to='support';
            $alloted_status='SA';
            $status='P';
            $contact="9994541232";


            $query="INSERT into associate_query (tracking_id, distributor_id, support_ticket_no, category, subject, post_query_date, response_date, alloted_to, alloted_status, status, contactno) values (?,?,?,?,?,?,?,'?','?','?',?)";
            $stmt=mysqli_prepare($db_selectsupport,$query);
            $stmt->bind_param($stmt,'iiissiissss', $tid_user_details,$did,$AcDate,$category,$subj,$dt,$response,$alloted_to,$alloted_status,$status,$contact);
            mysqli_stmt_execute($stmt);
Aftab H.
  • 1,517
  • 4
  • 13
  • 25
  • 1
    One of the two **$stmt**s is clearly redundant. – mario Feb 17 '18 at 06:14
  • 2
    Not exactly a duplicate of [PHP error: "Cannot pass parameter 2 by reference"](//stackoverflow.com/a/13105425) (but OP probably didn't spent much google effort either). – mario Feb 17 '18 at 06:18
  • @mario thank you i got it... –  Feb 17 '18 at 06:23

0 Answers0