开发者

Submit form to (own) server from localhost

So I have a PHP script that takes an argument/variable from a HTML form, processes it and echoes some stuff; just as usual.

I would like to get this application to work in AIR. As (at last as far as I know), you cant run PHP in AIR apps, you'd have to do it on another server.

So how can I submit the form (that runs on localhost/AIR) to the PHP script on my server?

Another question would be 开发者_JAVA技巧fetching the results again and displaying them on a local page.


Say you have a form, for example:

<form name="formname" action="script.php" method="post">

...

You can change the action to:

http://www.site.com/script.php or even the path to the script locally.

That way even if you are running the form locally, it will still post to the action, no matter where it is.

If your form is hosted on the internet, and you try and post it to a local action, it will not work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜