<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>表单验证</title>
</head>
<body>
<?php echo validation_errors();?>

<form action="<?php echo site_url('form_demo/insert');?>" method="post">
	name<input type="text" name="name" value="<?php echo set_value('name')?>"/>
	<?php echo form_error('name','<span>','</span>')?>
	<br>
	password<input type="password" name="password" />
	<?php echo form_error('password','<span>','</span>')?>
	<br>
	email<input type="text" name="email" value="<?php echo set_value('email')?>"/>
	<?php echo form_error('email','<span>','</span>')?>
	<br>
	<button type="submit">submit</button>
</form>
</body>
</html>