开发者

Writing html textfield value to PHP Session possible without refresh?

I want to be able to write some data to the PHP session AFTER the page has loaded, and BEFORE the page proceeds to the next page.

for example, this is a PHP file:

<input type="text" value="abc" />
<input type="button" onClick="doSomething开发者_运维问答()" />

How do I write "abc" to the php session (or whatever the user has typed in the textfield) in the javascript function doSomething()? Is this possible?


you can use ajax to pass the value to php while the page is open

this was on the "related" sidebar on the right, for reference How to use jQuery AJAX $.post to store PHP $_SESSION variables?

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜