我在下面的代码中没有发现任何错误。但是,在提交表单时,什么都没有发生。具体来说,我的页面没有重定向到其他页面。我正在使用 WAMP 服务器上的 CodeIgniter 在本地测试此代码。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Register New</title>
</head>
<body>
<?php $attributes = array('AUTOCOMPLETE' => 'off','method' =>'post');?>
<?=form_open('welcome/register',$attributes);?>
<table align="center" border="0">
<th>
<td colspan="3" >
<font color="#0033FF" title="" face="Times New Roman, Times, serif" size="+1">Register New</font>
</td>
</th>
<tr>
<td colspan="4" align="center" style="color:#FF0000; font-size:14px">
<?php
$vmsg=$this->session->userdata('msg');
if($vmsg)
echo $vmsg;
$this->session->unset_userdata('msg');?><?=validation_errors();
?>
</td>
</tr>
<tr>
<td>User Name: </td>
<td><div align="center" style="font:Geneva, Arial, Helvetica, sans-serif; color:#FF0000; font-size:14px;">*</div></td>
<td><input type="text" name="user_name" id="user_name" /></td>
</tr>
<tr>
<td>Designation: </td>
<td><div align="center" style="font:Geneva, Arial, Helvetica, sans-serif; color:#FF0000; font-size:14px;">*</div></td>
<td><input type="text" name="desig" id="desig" /></td>
</tr>
<tr>
<td>Phone No.: </td>
<td><div align="center" style="font:Geneva, Arial, Helvetica, sans-serif; color:#FF0000; font-size:14px;">*</div></td>
<td><input type="text" name="ph_no" id="ph_no" /></td>
</tr>
<tr>
<td>Login ID:</td>
<td><div align="center" style="font:Geneva, Arial, Helvetica, sans-serif; color:#FF0000; font-size:14px;">*</div></td>
<td><input type="text" name="login_id" id="login_id" /></td>
</tr>
<tr>
<td>Password:</td>
<td><div align="center" style="font:Geneva, Arial, Helvetica, sans-serif; color:#FF0000; font-size:14px;">*</div></td>
<td><input type="password" name="pwd" id="pwd" /></td>
</tr>
<tr>
<td>Retype Password:</td>
<td><div align="center" style="font:Geneva, Arial, Helvetica, sans-serif; color:#FF0000; font-size:14px;">*</div></td>
<td><input type="password" name="re_pwd" id="re_pwd" /></td>
</tr>
<tr>
<td colspan="3" align="right">
<input type="submit" name="btnsubmit" value="Save" />
</td>
</tr>
</table>
</form>
</body>
</html>
请注意form_open
PHP 代码中的指令。
如何修复表单提交过程?