i want to add Json output data to my SQL database Users option but not adding
i want to add the json output data to the data of customer account creation, i use this code but it only account creation apply to my SQL database but the Json output from my endpoint url does not added to the database
please any solution?
i use this code below
//execute the started curl session
$output = curl_exec($ch);
//var_dumb($output);
$err = curl_error($ch);
if ($err){
exist("Error Encountered ".$err);
}
$jsonoutput = json_decode($output);
//close the session and delete the variable made by curl_init
curl_close($ch);
if($jsonoutput->status = 1){
$customer_code = $jsonoutput->data->customer_code;
$sql = "insert into #__n(customer_code)values('$customer_code')";
if($data->var_dump($sql)){
echo "Account successfully Created". $customer_code;
}else{
echo $data->dberror();
}
I mean like the output data on my endpoint call api which returns "customer_code" as a form of successful creation on the called api so I want to input this return data automatically into my SQL database value on successful creation of a customer account.
Maybe but not for sure, written forces us to be clear; it is always possible to rephrase what you don't understand ... moreover it can be useful for others.
@sr57@sr57 maybe because I have many database that's why the code is not working out.
Let assume I have databases:
Nord_vee
Nord_mee
Nord_cee
And I want to input the data to Nord_mee on the table "users" with value "customer_code" so how will the code looks like