Home  >  Article  >  Backend Development  >  php 想点击星期一时获取本月所有星期一的数据新手 急

php 想点击星期一时获取本月所有星期一的数据新手 急

WBOY
WBOYOriginal
2016-06-23 13:39:35903browse

我index.php 页面上有

  •  星期一

  •                   
  •  星期二

  •                   
  •  星期三

  •                   
  •  星期四

  •                   
  •  星期五

  •                   
  •  星期六

  •                   
  •  星期日


  • 想点击星期一时获取本月所有星期一的数据
    想点击星期二时获取本月所有星期二的数据

    显示到resuindex.php页面上
    没有思路
    a标签的我不知道怎么传过去resuindex.php页面上


    回复讨论(解决方案)

  • 星期一

  • 星期一
  • <li> <a href="resuindex.php?w=1">星期一</a></li><li> <a href="resuindex.php?w=2">星期二</a></li><li> <a href="resuindex.php?w=3">星期三</a></li><li> <a href="resuindex.php?w=4">星期四</a></li><li> <a href="resuindex.php?w=5">星期五</a></li><li> <a href="resuindex.php?w=6">星期六</a></li><li> <a href="resuindex.php?w=7">星期日</a></li>


    resuindex.php
    $w = isset($_GET['w'])? $_GET['w'] : '';if(!in_array($w, array(1,2,3,4,5,6,7))){    echo 'w error';    exit();}// 执行查询db语句,然后输出

    Statement:
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Previous article:Ubuntu PHPNext article:这到底是为了啥关于like