Unable to insert the value in the database

  • Profile Image
    bishopkldavis2
    Asked on July 08, 2019 at 03:03 AM

    I AM CURRENTLY HAVING A PROBLEM WITH INSERTING registrationFee INTO THE MYSQL DATABASE. ALL OTHER FIELDS ARE BEING ADDED.

    Data Submitted:

    Array

    (

    [submission_id] => 4383341279815026492

    [formID] => 90867582341161

    [ip] => 67.181.29.189

    [studentname] => Array

    (

    [0] => Kenneth

    [1] => L

    [2] => Davis

    )

    [birthdate24] => Array

    (

    [0] => January

    [1] => 17

    [2] => 1972

    )

    [gender] => Male

    [address] => Array

    (

    [0] => 6453 brando loop

    [1] =>

    [2] => fair oaks

    [3] => CA

    [4] => 95628

    [5] => United States

    )

    [studentemail6] => bishopkldavis@yahoo.com

    [mobilenumber] => Array

    (

    [0] => 916

    [1] => 5833900

    )

    [phonenumber25] => Array

    (

    [0] => 916

    [1] => 5833900

    )

    [degreetype] => Doctorate

    [registrationfee] => Array

    (

    [0] => ["Registration Fee (Amount: 75.00 USD)"]

    [1] => USD

    [2] => 75.00

    [3] => 39361962NB591011E

    [4] => 2.48

    [5] =>

    [6] => kenneth davis

    [7] => bishopkldavis@yahoo.com

    )

    )

    PHP Code:

    $_POST['submission_id'];

    $_POST['formID'];

    $_POST['ip'];

    $_POST['studentname']['0'];$_POST['studentname']['1'];$_POST['studentname']['2'];

    $_POST['birthdate24']['0'];$_POST['birthdate24']['1'];$_POST['birthdate24']['2'];

    $_POST['gender'];

    $_POST['address']['0'];$_POST['address']['1'];$_POST['address']['2'];$_POST['address']['3'];$_POST['address']['4'];$_POST['address']['5'];

    $_POST['studentemail6'];

    $_POST['mobilenumber']['0'];$_POST['mobilenumber']['1'];

    $_POST['phonenumber25']['0'];$_POST['phonenumber25']['1'];

    $_POST['degreetype'];

    $_POST['registrationfee']['0'];$_POST['registrationfee']['1'];$_POST['registrationfee']['2'];$_POST['registrationfee']['3'];$_POST['registrationfee']['4'];$_POST['registrationfee']['5'];$_POST['registrationfee']['6'];$_POST['registrationfee']['7'];



    This is a re-post of a comment on How to Post Screenshots to Our Support Forum

  • Profile Image
    roneet
    Answered on July 08, 2019 at 05:05 AM

    Could you please print the syntax in your PHP code and see what values are you getting while you are printing it in the console.

    $_POST['registrationfee']['0'];$_POST['registrationfee']['1'];$_POST['registrationfee']['2'];$_POST['registrationfee']['3'];$_POST['registrationfee']['4'];$_POST['registrationfee']['5'];$_POST['registrationfee']['6'];$_POST['registrationfee']['7'];

    From the logs which you have shared it seems you are able to get the value:

    [registrationfee] => Array

    (

    [0] => ["Registration Fee (Amount: 75.00 USD)"]

    [1] => USD

    [2] => 75.00

    [3] => 39361962NB591011E

    [4] => 2.48

    [5] =>

    [6] => kenneth davis

    [7] => bishopkldavis@yahoo.com

    )

    Let us know if you are able to get the value.

    Thanks.