使用Android将参数发送到PHP [英] Send Parameter with Android To PHP

查看:86
本文介绍了使用Android将参数发送到PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将Android中 ToggleButton 中的参数发送到PHP服务器?例如,当ToggleButton处于打开状态时,将值发送到Mysql"1",而当关闭时则发送值"0".
感谢您的帮助!

how can I send parameter from ToggleButton in Android to PHP server? For example when the ToggleButton is on send value to Mysql "1" and when is off send "0" .
thank you for helping!!

推荐答案

我认为您在Android上运行的是客户端.因此,目前尚不清楚您在Android上运行什么代码.如果这仅是Web浏览器,则此处的Android无关紧要的是,无论如何,所有HTML和JavaScript代码都是从服务器加载的.问题是:就客户端而言,没有"PHP服务器"之类的东西.服务器端技术对仅看到HTTP服务器的客户端是完全透明的.要将请求发送到服务器,可以使用Web表单或AJAX调用.

-SA
I presume on Android you run a client part. So, it''s not clear what code do you run on Android. If this is just a Web browser, Android on not is not relevant here, all the HTML and JavaScript code is loaded from the server anyway. The thing is: for a standpoint of a client part, there is no such thing as a "PHP server". The server-side technology is fully transparent to the client which only sees a HTTP server. To send a request to the server, you can use either Web form or AJAX call.

—SA


Send and Recive Parameter with Android To Mysql PHP[^]
I found the solution and share in my profile here !


这篇关于使用Android将参数发送到PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆