Posted by:
Animal
(---.range86-137.btcentralplus.com)
OK, I see json_decode, but passing that JSON string results in a "thing" that I can't seem to use as a regular PHP object/array
I use
$rec = json_decode($_REQUEST['data']);
$sql = "INSERT INTO movies (id,title,director,runtime,released,genre,tagline) VALUES (".
"0,".
"'".$rec['title']."',".
"'".$rec['director']."',".
$rec['runtime'].",".
$rec['released'].",".
$rec['genre'].",".
"'".$rec['tagline']."'".
"";
and It throws
Cannot use object of type stdClass as array in <b>C:\wamp\www\LearningExtJS\rewrites\chap1-7_Code\Chapter6\movies-sync.php</b> on line <b>1
Edited 1 time(s). Last edit at 08/21/2010 04:04PM by Animal.