Welcome Guest, Not a member yet? Register   Sign In
Using Form Validation Class to validate non-form values
#1

[eluser]nyalex[/eluser]
Currently I am using the Form Validation Class to validate the user's form submit, as expected.

However, sometimes users enter the "results" pages (the page that is displayed once the form is submitted) without filling out the form first. In these instances, I want to validate the users cookie values (which are stored in variables); I always create cookies to store the user's previous form submission.

Is this possible?
#2

[eluser]Aljebrini[/eluser]
why you don't use session to store user information in ?
Look inside .. Wink it's based on Cookies but it's very useful for you, and you can validate the data stored in the session in each controller constructor.

am using this way to give authentication and make user roles Smile
#3

[eluser]nyalex[/eluser]
[quote author="eng-jebrini" date="1267710064"]why you don't use session to store user information in ?
Look inside .. Wink it's based on Cookies but it's very useful for you, and you can validate the data stored in the session in each controller constructor.

am using this way to give authentication and make user roles Smile[/quote]

Do you create new validation functions for them? Do you still validate through form_validation?
#4

[eluser]nyalex[/eluser]
Nevermind. I figured it out. Simple solution. I simply redefined the relevant $_POST variable.
#5

[eluser]Aljebrini[/eluser]
[quote author="nyalex" date="1267914798"][quote author="eng-jebrini" date="1267710064"]why you don't use session to store user information in ?
Look inside .. Wink it's based on Cookies but it's very useful for you, and you can validate the data stored in the session in each controller constructor.

am using this way to give authentication and make user roles Smile[/quote]

Do you create new validation functions for them? Do you still validate through form_validation?[/quote]


NO idon't use form validation class for that, you don't need that in your session validation !




Theme © iAndrew 2016 - Forum software by © MyBB