dpj83664
dpj83664
2017-04-06 19:09
浏览 32

单击页面上的按钮以使用PHP增加另一页中的计数器?

so as the title says, I've a button on my main page which should send the amount of times clicked to another page.

I know how to do this via JS, but not in PHP. PHP is also not live, so I'd need to refresh the webpage in order to see the effect, I've been reading about it and I might try and mess around with AJAX to refresh a certain element of my webpage.

Is it possible to do this?

图片转代码服务由CSDN问答提供 功能建议

所以标题上写着,我的主页上有一个按钮,它应该发送点击的次数 另一页。

我知道如何通过JS做到这一点,但不是用PHP。 PHP也不是活的,所以我需要刷新网页才能看到效果,我一直在阅读它,我可能会尝试使用AJAX来刷新我的网页的某个元素。

是否可以这样做?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doupu0619
    doupu0619 2017-04-06 19:17
    已采纳

    I think you should save it somewhere because PHP is handled server side. So either a cookie/session or a database.

    点赞 评论

相关推荐