codeigniter form validation if failed send user back
Posted
by
Momen M El Zalabany
on Stack Overflow
See other posts from Stack Overflow
or by Momen M El Zalabany
Published on 2012-12-11T10:36:16Z
Indexed on
2012/12/11
11:03 UTC
Read the original article
Hit count: 292
i have this controller(visits.php) that use 3 models to build page, then it pass 4 vars to a view.
this view contain a form that submit to another page (add_user.php)
my question is how can i send the user back to visits.php in case the for_validation is false ? do i have to reload visits.php allover again ?-waste of resourss- or i should just send him back in history with js or php header for example ? can u plz show me an example of how u best handle false result of form_validation ?
Note that when i user
header('Location: ' . $_SERVER['HTTP_REFERER']);
i couldnt echo validation_error() :(
thanks for help
© Stack Overflow or respective owner