|
求助!!!下面传统的代码如何如果用ci的控制器和视图写???
<?php
session_start();
@$username=$_POST["username"];
@$password=$_POST["password"];
$_SESSION['name']=$username;
if($_SESSION['name'] == ''){
?>
<Center>
<form name="f1" method="post" action="login.php">
<table border="0" bgcolor="#CCCCCC" cellspacing="1" cellpadding="3" width="316">
<tr>
<td align="left" colspan="2"><b><font size="5" color="#000080">Login</font></b></td>
</tr>
<tr>
<td align="right" width="124"><b><font color="#000080">UserName:</font></b></td>
<td width="177"><input type="text" name="username" id="user" size="20" value="" /></td>
</tr>
<tr>
<td align="right" width="124"><b><font color="#000080">Password:</font></b></td>
<td width="177"><input type="password" name="password" size="20" value="" /></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="SUBMIT" name="a1" value="Login"></td>
</tr>
</table>
</form>
</center>
<?php
}else{
?>
<Center>
<table border="0" bgcolor="#ff0000" cellspacing="1" cellpadding="3" width="316">
<tr>
<td align="center" colspan="2"><b><font size="5" color="#000080"><?php echo $_SESSION['name'];?>欢迎你登陆</font></b></td>
</tr>
<tr>
<td align="center" width="124"><b><font color="#000080">随便写点</font></b></td>
</tr>
<tr>
<td align="center" width="124"><b><font color="#ffff00">111111111:</font></b></td>
</tr>
<tr>
<td colspan="2" align="center">000000</td>
</tr>
</table>
</center>
<?php
}
?>
|
|