I am getting below values in Browser & I saved AWBNoSeries values in Database....
ReturnMessage": "AWBNoSeries":["1234","5678",
Now i need to save other 2 column values in mysql table ecomexpress_awb & in columns [ awb_type & status ].... When i tried below code, i dont get any error, but other 2 column values will not save in DB....
<?php
$mysqli = mysqli_connect("localhost","root","","do_management4");
$parsedData = json_decode($curl_response, true);
$stmt = $mysqli->prepare("INSERT INTO ecomexpress_awb(awb,awb_type,status) VALUES (?,?,?)");
$cod="COD";
$status="unused";
//loop through values and insert each one into the db
foreach ($parsedData['AWBNoSeries'] as $awb){
$stmt->bind_param("iii", $awb , $cod, $status);
$stmt->execute();
}
$stmt->close();
mysqli_close($mysqli);
?>