Heim  >  Artikel  >  Backend-Entwicklung  >  表单有关问题

表单有关问题

WBOY
WBOYOriginal
2016-06-13 10:47:39984Durchsuche

表单问题
你看下面查询 不是有好多空 写的吗 写的东西 我当SQL 语句的条件 select * from 套口 where 姓名=XX and 男方姓名=XX …… 这样的 然后给下面的表格输出
但是他不保存 输入的值 不知道 怎么搞 然后还有分页的问题 做了个分页 也不行 都是先判断 文本框有没有输入才输出的 我现在 不能保存输入的值 一点查询 值就没了 我表示很无奈的 亲


 if(isset($_POST["name"],$_POST["time"],$_POST["nname"])){

  $name=$_POST["name"];
  $nname=$_POST["nname"];
  $time=$_POST["time"];
  $shenpi=$_POST["shenpi"];
  
  $outfile=$_POST["outfile"];
  $zubie=$_POST["zubie"];
  echo $name;
  echo $time;
  
 
  $sql="SELECT * FROM `{$kind}` 
 where 审批";
  if($shenpi!='all')  
{
$sql .="='$shenpi' ";
 
 
}
  else if($shenpi='all')  
{
$sql .=" is not null ";
 
 
}
  if($name) //name不为空
{
$sql .=" and 育妇姓名='$name' ";
 
 
}
 
 
 
if($time)
{

$sql .="and 录入时间='$time'";

 
 
}



if($nname)
{
$sql .="and 丈夫姓名='$nname'";




}

if($zubie!='全村')

{
$sql.=" and 组别='$zubie'";






}


echo $sql;
 $query=mysql_query($sql);


while($array=mysql_fetch_array($query)){
if( !$outfile==''){


   
 
 
  &kind=">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn