Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

Hi all,

Can anyone explain how to use JSON (JavaScript Object Notation) with
php and post a sample, or any good site that has.



Found this.  Seems simple enough.



I've found that sample too and i can convert my data into json format i
just don't get how to send it and get new data with it.

I'm trying to do something like;

With one page, at first  show the login page for example. After the
user enters information like username and password, query the database
and return a result that the information is valid and when it is valid
show the user the main menu at the same page without refreshing the

It can be done with json i think but my problem is how to pass the data
to another page and get a new data without refreshing.


I'm not sure about doing this without refreshing.  You could probably
use frames and not reload the frame that holds your form (kind of like
gmail uses).  Of course, this would require a lot of javascripting.

JSON is just a format in which to transfer data.  It is written so that
the eval() function in javascript can handle the data very easily.  If
you're querying a database (which is server side), I don't think that
javascript (client side) will play a large role.

Does this project require the page not be refreshed?


Quoted text here. Click to load it

 JSON is a format typically used in conjunction with XMLHTTPRequest Javascript
objects, which let you retrieve data in Javascript in response to user actions,
without a complete page refresh.

 Also search for "Ajax" which is the currently fashionable name for joining
together the various techniques involved.

< Space: disk usage analysis tool


Thanx all, i've found what i was looking for. it was XMLHttpRequest not
JSON... any way wrong question but true answer came.

Site Timeline