Mysql
 sql >> Database >  >> RDS >> Mysql

Come estrarre i dati json e inserirli in mysql php

Fai qualcosa del genere..

<?php
$json_data=$_POST['contactdetails'];
$data=json_decode($json_data, true); // Added true flag

// You can access your variables like this..
echo $data['phone number'];// prints "5555"
echo $data['username']; // prints "xfg"

//do your db connection...

// execute your query with those variables...

?>