PHP to Javascript (store in a VAR Array?)

Hi,

How do I pass variables (downloaded using php and JSON coding) from one website to another where the other website DOES NOT use PHP?

I think I will need to use VAR array but how do I store the VAR on the first website (using PHP) and pass it to the other website (without using PHP)?

Thanks,

Matt.

You’re not giving much information, are you? :slight_smile:

If it was the same website, the answer would be using forms. Not that the form needs to be visible, but when you submit a form using php, and direct it to another page, php automatically creates an array with all the values for each field in the form.

Passing on information to another website it is a bit more complicated because it really depends on configuration and other stuff. Most of the time, you will use an API facilitated by the owner of the other site, or some kind of cgi script.

In this case, you’d also be submitting a form but to the API or CGI which will process the information and, if necessary, will return some kind of result.

As an example, if you had an online shop and you were using a merchant account to process payments, you would send a form with the ID of the sale and the total amount to an API, and the API would send back some result indicating if the transaction has gone throught.

doesn’t matter what technology this ‘other website’ uses, as long as you can access it via a supported abstraction layer like SOAP, HTTP/REST, or some socket - so just ask the developer for an API definition.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.