>백엔드 개발 >PHP 튜토리얼 >CI框架,表述提交没有反应,这是为什么呢

CI框架,表述提交没有反应,这是为什么呢

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB원래의
2016-06-13 11:18:24933검색

CI框架,表达提交没有反应,这是为什么呢
这是view里的表单的代码块

<br /><form class="login active" action="http://localhost/~chrisfu/CI/index.php/login/checklogin" method="post"><br />						<h3>Login</h3><br />						<div><br />							<label>Username:</label><br />							<input type="text" name="name"/><br />							<span class="error">This is an error</span><br />						</div><br />						<div><br />							<label>Password: <a href="forgot_password.php" rel="forgot_password" class="forgot linkform">Forgot your password?</a></label><br />							<input type="password" name="psword"/><br />							<span class="error">This is an error</span><br />						</div><br />						<div class="bottom" ><br />							<div class="remember"><input type="checkbox" /><span>Keep me logged in</span></div><br />							<input type="submit" value="Login" name="submit"></input><br />							<a href="register.php" rel="register" class="linkform">You don't have an account yet? Register here</a><br />							<div class="clear"></div><br />						</div><br />					</form><br />



这是php代码
<br /><?php<br />class Login extends CI_Controller{<br />	function index(){<br />		$this->load->view('index');<br />	}<br />	function checklogin(){<br />		$this->load->model('test_m');<br />		$user=$this->test_m->user_select($_POST['name']);<br />		<br />		if($user){<br />			if($user[0]->upass==$_POST['pword']){<br />				echo "password right";<br />				$this->load->library('session');<br />				$arr=array('uid'=>$user[0]->uid);<br />				$this->session->set_userdata($arr);<br />				echo "<br>";<br />				echo $this->session->userdata('uid');<br />			}else{<br />					echo "password wrong";<br />			}<br />		}else{<br />			echo "user not exist";<br />		}<br />	}<br />}<br />	<br />?><br />

php h?t?m?l CI
------解决方案--------------------
换下提交按钮的名字试下,用firebug监视一下网络
성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.