Actually I want need server side doing work, and I don't know how php
get json, nothing to do with client side.
On 6月12日, 下午4時55分, Anish wrote:
> What you get while trying $json['name'] ??
>
> Why don't you try getJSON instead of calling usual ajax call ??
>
> Regards,
>
> Anish**
>
> On Jun 11,
What you get while trying $json['name'] ??
Why don't you try getJSON instead of calling usual ajax call ??
Regards,
Anish**
On Jun 11, 4:40 pm, "David .Wu" wrote:
> If I send a json format to php, how to get the value from php? for
> example
>
> front page
>
> var jsonStr = '{"name": "David"
it's work, cool.
On 6月11日, 下午11時58分, Tomáš Kavalek wrote:
> Maybe you should use json_decode($json, true); in case of you have a
> problem with json_decode($json);
>
> On 11 čvn, 14:17, Chris Chen wrote:
>
> > $json = $_POST['json'];
> > $user = json_decode($json);
> > echo $user['name'];
>
> >
Maybe you should use json_decode($json, true); in case of you have a
problem with json_decode($json);
On 11 čvn, 14:17, Chris Chen wrote:
> $json = $_POST['json'];
> $user = json_decode($json);
> echo $user['name'];
>
> 2009/6/11 Val Cartei
>
>
>
>
>
>
>
> > with data.name (data is the json obj
David .Wu wrote:
If I send a json format to php, how to get the value from php? for
example
front page
var jsonStr = '{"name": "David", "age", "23"}';
$.ajax({
url: 'json.php',
type: 'POST',
cache: false,
data: {json: jsonStr},
success: function(data) {
$json = $_POST['json'];
$user = json_decode($json);
echo $user['name'];
2009/6/11 Val Cartei
>
> with data.name (data is the json object you pass to your success
> function). Like:
>
> success: function(data) {
>alert(data.name);
>}
>
> Val
>
> On Thu, Jun 11, 2009 at 12:
with data.name (data is the json object you pass to your success
function). Like:
success: function(data) {
alert(data.name);
}
Val
On Thu, Jun 11, 2009 at 12:40 PM, David .Wu wrote:
>
> If I send a json format to php, how to get the value from php? for
> example
>
> fro
7 matches
Mail list logo