简体   繁体   English

在PHP中可以自动保存功能吗

[英]Is autosave function possible in PHP

I'm working on my own project where user able to log in and they can play games from their profile and i also have read only textbox where the scores shows up in the profile and i am wondering is it possible for me to auto save that score in the database without the user clicking save. 我正在自己的项目中工作,用户可以登录并可以从其个人资料玩游戏,而且我还只读了文本框,分数显示在个人资料中,我想知道我是否可以自动保存用户无需单击保存即可在数据库中获得分数。

so far i have completed all this but i am just wondering is auto save possible in php or do i have to use completely different language. 到目前为止,我已经完成了所有这一切,但是我只是想知道是否可以在php中自动保存,或者我必须使用完全不同的语言。

I am using php and sqlite. 我正在使用php和sqlite。

You can create a php page that will edit the table. 您可以创建一个将编辑表的php页面。 scorekeeper.php?userid="[USERID]"&userscore=[USERSCORE] scorekeeper.php?userid =“ [USERID]”&userscore = [USERSCORE]

and call that php by using Ajax Jquery every interval that you want with the userid and userscore variables. 并使用userid和userscore变量在每个所需的间隔使用Ajax Jquery调用该php。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM