我已经构建了一个php页面,它使用GET请求查询Mysqli数据库。 其中一个GET变量(&day =)按日期查询数据。 如果day = 0,则查询实际日期。 如果day = 1,则查询date-1,依此类推。 这适用于混合javascript和php表单+按钮的2个按钮。 (代码粘贴到某处并根据我的需要进行修改)
今天我在网页上添加了一些“cosmectics”。 我添加了一些文件夹,如链接。
我陷入困境,我无法通过点击+和 - html链接找到如何更改日变量...
我的页面要更清楚了......
链接代码: echo "<li><a href='".$_SERVER['PHP_SELF']."?rucher=".$rucher_nr."'><span>-</span></a></li>"; 谢谢,
I have build a php page that queries a Mysqli database with a GET request. One of the GET variables ( &day= ) queries the datas by date. If day=0 it queries the actual date. If day = 1 it queries date-1, and so on. This works fine with 2 buttons mixing javascript and php form + buttons. (code pasted somewhere and modified to my needs)
Today i added some "cosmectics" to my page. I added some folder like links.
I'm stucked in that i can't find how to change the day variable by clicking on the + and - html links...
My page to be more clear...
The link code : echo "<li><a href='".$_SERVER['PHP_SELF']."?rucher=".$rucher_nr."'><span>-</span></a></li>"; Thanks,
最满意答案
我终于找到了一个使用会话变量的纯PHP解决方案,我正在递增你通过2个链接和一个GET帖子递减。 我还修改了我的SQL查询以通过DATE查询而不是使用INTERVAL查询。
对不起带宽......
I finally found a pure php solution using a session variable i'm incrementing ou decrementing through 2 links and a GET post. I also modified my SQL query to query by DATE and not with the INTERVAL query.
Sorry for bandwidth...
更多推荐
发布评论