我如何发送一个http GET请求与链接点击与php后的inc /减少变量(How can i send a http GET request with a variable that inc/dec

编程入门 行业动态 更新时间:2024-10-25 20:28:03
我如何发送一个http GET请求与链接点击与php后的inc /减少变量(How can i send a http GET request with a variable that inc/decrease after link click with php)

我已经构建了一个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...

更多推荐

本文发布于:2023-07-09 02:25:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1082898.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:变量   链接   send   http   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!