|  | 
 
 
 楼主|
发表于 2010-11-25 14:39:40
|
显示全部楼层 
| 回复 2# jeongee 
 
 <html>
 <body>
 <?php ob_start(); ?>
 <form name="form1" method="post" action="">
 <input name="Name1" type="text">
 <input name="Password" type="password">
 <input name = "sumbit" type="submit" onClick="">
 </form>
 <?php
 
 if(isset($_POST['Name1']))
 echo $_POST['Name1'];
 $this->load->model('display');
 $dt = $this->display->comp();
 foreach($dt as $row)
 {
 
 if(isset($_POST['Name1']))
 if($row->Name==$_POST['Name1']&&$row->Password==$_POST['Password'])
 {
 $temp = 1;
 
 }
 }
 if(isset($temp))
 {
 echo"可以登陆";
 header("location:http://192.168.1.112/index.php/database/index");
 exit();
 ob_end_flush();
 
 
 
 }
 else
 {
 echo "无法登陆,请重新输入";
 
 }
 
 ?>
 </body>
 </html>
 | 
 |