Use json variable in jquery in PHP to read table

Dear Sir/Madam

i am using following code to get
2 fields

  1. master
  2. data
    from a table

and store them in input fields

  1. master(database table field)==>input field :otherinfocategorymaster
  2. data (database table field)==>input field : otherinfodata
    from a table
  $.getJSON("otherinfojsonfill.php", {id: otherinfomasterid }, function(data){
									$('#otherinfocategorymaster').val(data['master']);
									$('#otherinfodata').val(data['data']); 
								 })

pls help me how can i use JSON fields in php

can i use data[‘data’]
or
data[‘otherinfocategorymaster’]
in php code

example database field master contents the name of master table
which I want to read in php

Wecome to the forums.

When asking for help follow those 3 steps:

  1. What is happening
  2. Show us the code
  3. What have you tried

Your message is hardly understandable, title does not help too.
If you want quality answer you need to write a quality post.

Here is a link. Will it help? No idea, I don’t understand your problem…

$.getJSON("otherinfojsonfill.php", {id: otherinfomasterid }, function(data){
									$('#otherinfocategorymaster').val(data['master']);
									$('#otherinfodata').val(data['data']); 
								 })
``` #
this code helps me to avail data['master'] of database to   otherinfocategorymaster,
i wan to use this in php

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.