Jump to content
php.lv forumi

GET/POST request


euphoric

Recommended Posts

Sveiki.

 

Analizējot 'X' portāla, scripta, POST datu padošanu, caur FireBug var novērot šādu stringu :

 

POST www.X.lv/script.php

application/x-www-form-urlencoded

 

{"status":"someStatus","someth":{"a":"0","b":50,"c":true,"d":false,"e":false}}

 

Mēģināju sastādīt ar rociņām šo `request` un iebāzt kā GET , Url'ā ..

 

www.X.lv/script.php?status=someStatus&someth[a]=0&someth=50&someth[c]=true&someth[d]=false&someth[e]=false

 

Kā arī tāds variants :

 

www.X.lv/script.php?status=someStatus&a=0&b=50&c=true&d=false&e=false

 

Neiet cauri, vienīgais: "status=someStatus", tiek pieņemts un apstrādāts, bet pārējā daļa nē..

 

Kur varētu būt mana kļūda, pieraksts ?

 

Paldies :)

Edited by euphoric
Link to comment
Share on other sites

tapec ka:

"status":"someStatus"

"someth":{"a":"0","b":50,"c":true,"d":false,"e":false}}

tas ir ~~ tas pats kas PHP buutu

---

$masivs['statuss']="someStatus";

$masivs2['a']=0;

$masivs2['b']=50;

$masivs2['c']=true;

$masivs2['d']=false;

$masivs2['e']=false;

$masivs['someth']=$masivs2

---

tatad Arrya elements $masivs['statuss'] ietver sevii apaksmasiivu.

a tu megjinaji padoot visu kaa vienliimenja masiivu.

Visticamak tie POST dati nak no AJAX kursh padod JS objektu

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...