Friday, 15 February 2013

php decode JSON -> mysql query -


I am trying to create a query I do not know why this php does not work.

There is no change in my DB.

What are the errors?

  & lt;? $ Json = file_get_contents ('php: // input'); $ Obj = json_decode ($ json); $ Con = mysql_connect ("localhost: (port)", "id", "pw") or die (can not be connected to 'db); Mysql_select_db ("DBID", $ thief); $ Line = $ obj- & gt; {"Menusel_row"}; $ Col = $ obj- & gt; {"Menusel_col"}; $ Val = $ obj- & gt; {"Menuvalue"}; Mysql_query ("UPDATE SET $ row = '$ val', where id = '$ col'", $ con); Mysql_close ($ thief); ? & Gt;  

A brief note: You can use PHP & lt; ? , this feature is most disabled on your PHP server because it is obsolete

The absence of any output is probably related to it. Instead & lt ;? Use Php .


No comments:

Post a Comment