Form Validation |
[eluser]parabolic151[/eluser]
Hey, I am having an issue with validating my form, for some reason the form_validation library is not loading... this is my Email Controller: Code: <?php This is the error message that comes up when i try to use the form.. Quote:A PHP Error was encountered if you want to see MY SITE it is the contact section I am having issues with...
[eluser]parabolic151[/eluser]
it is referring to : $this->load->form_validation->set_rules('name', 'Name', 'trim|required');
[eluser]maria clara[/eluser]
[quote author="parabolic151" date="1265704203"]it is referring to : $this->load->form_validation->set_rules('name', 'Name', 'trim|required');[/quote] can you try this: Code: $this->form_validation->set_rules('name', 'Name', 'required'); and yo check this thread... http://ellislab.com/forums/viewthread/47592/
[eluser]tomcode[/eluser]
You load the library only in the method index(), put the call into the constructor or the send method.
[eluser]theprodigy[/eluser]
Quote:You load the library only in the method index(), put the call into the constructor or the send method.and, once you have moved the loading of the library to the constructor, make sure you change your rule setting to: Code: $this->form_validation->set_rules('name', 'Name', 'required'); Code: $this->load->form_validation->set_rules('name', 'Name', 'required');
[eluser]parabolic151[/eluser]
ok thanks, that fixed the problem, now a bunch of other Errors show up. But hey, the validation works now. Thank you for your Help!!
[eluser]parabolic151[/eluser]
A PHP Error was encountered Severity: Notice Message: Undefined variable: subject Filename: controllers/email.php Line Number: 46 A PHP Error was encountered Severity: Notice Message: Undefined variable: message Filename: controllers/email.php Line Number: 47 A PHP Error was encountered Severity: Warning Message: fsockopen() [function.fsockopen]: unable to connect to ssl://smtp.googlemail.com:465 (Connection timed out) Filename: libraries/Email.php Line Number: 1652 A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1795 A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818 A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1795 A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818 A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1795 A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818 A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1795 A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818 A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1795 A PHP Error was encountered Severity: Warning Message: fwrite() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1795 A PHP Error was encountered Severity: Warning Message: fgets() expects parameter 1 to be resource, boolean given Filename: libraries/Email.php Line Number: 1818 A PHP Error was encountered Severity: Warning Message: Cannot modify header information - headers already sent by (output started at /customers/pdbmedia.com/pdbmedia.com/httpd.www/system/libraries/Exceptions.php:166) Filename: codeigniter/Common.php Line Number: 356 An Error Was Encountered The following SMTP error was encountered: 110 Connection timed out Unable to send data: AUTH LOGIN Failed to send AUTH LOGIN command. Error: Unable to send data: MAIL FROM:
[eluser]maria clara[/eluser]
can you post the code that pertains those error?? |
Welcome Guest, Not a member yet? Register Sign In |