简体   繁体   中英

Pass data from a php script to html form

I have an iphone app. The user can complete a form. Then the data of the form are passed to a php script. There I parse.

Now, question is:

Is it possible to pass data from a php script to an html form(on a web site this time)?

Ie

Json sent from the mobile to the php scipt:

{
  "Email":"klklkkl",
  "DueDate":"1454"
}

The php parse the aforementioned Json.

Now there is on the web site the same form. And I want to pass to the two input boxes that are contained there the aforementioned data. Is this possible?

You'll need to use JavaScript in order to process this information client-side. The combination of a server communicating via XML with a client-side JavaScript script is often called AJAX. Or: Asynchronous JavaScript and XML.

However, I recommend you use JSON instead of XML because you can send the same information with far less characters (bytes), if you use it correctly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM