Welcome Guest, Not a member yet? Register   Sign In
$_POST validation not FORM validation
#1

[eluser]xtarx[/eluser]
I want to validate some POST data from an 'httpRequest' using the same functions of

form validation , i did some how copy functions form the 'form_validation' library ,but is there any better way to do it?

I want to do something like this

Code:
$this->form_validation->set_rules($_post['username'], 'Username', 'required');
$this->form_validation->set_rules($_post['password'], 'Password', 'required');
$this->form_validation->set_rules($_post['email'], 'Email', 'required');
#2

[eluser]Glazz[/eluser]
Replace:

Code:
'$_post['username']'

with

Code:
'username'


And do the same for the other inputs you are going to check, hope it works.
#3

[eluser]xtarx[/eluser]
@Glazz

no , it didn work , I dont want to do Form validation because i dont have a form , i wantto use this validiton to validate some POST variables




Theme © iAndrew 2016 - Forum software by © MyBB