By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,402 Members | 1,628 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,402 IT Pros & Developers. It's quick & easy.

PHP-JSON

P: n/a
Hi all,

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

Thanks

Jul 17 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Found this. Seems simple enough.

http://mike.teczno.com/JSON/READ-ME-JSON.phps

-aaron

Jul 17 '05 #2

P: n/a
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
page.

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.

Jul 17 '05 #3

P: n/a
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?

Jul 17 '05 #4

P: n/a
On 24 May 2005 01:18:38 -0700, "Botan Guner" <bo*********@gmail.com> wrote:
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
page.

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.


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.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #5

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

Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.