Nick Robertson
Nick Robertson

Reputation: 1047

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)?

I.e.

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?

Upvotes: 1

Views: 182

Answers (1)

Jochem Kuijpers
Jochem Kuijpers

Reputation: 1797

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.

Upvotes: 2

Related Questions