puzzling error msg in form validation controller |
[eluser]TheFuzzy0ne[/eluser]
I don't understand what you're trying to do, but to concatenate strings you need to use the . operator. Code: $some_var . "some string" . "another string" . $another_var . ' ' . $another_var2;
[eluser]Dam1an[/eluser]
Or if you don't want to do concatenation, you can use double quotes, in which case variables will be replaced with their values And Fuzz, it was 15 minutes between my post stating the problem and n0xies stating it, followed by you 3 inutes later
[eluser]TheFuzzy0ne[/eluser]
One suggestion might be for you to use a view for your Email. Pass some variables into it, get the resulting page, and then stick it in your Email.
[eluser]oldnews[/eluser]
To clarify, my email submit form in views follows the CI User Guide's suggested layout. I don't believe that is the problem, particularly since I have triple checked to be sure the assigned field names match the designated variables in the form validation routine. My issues continue to revolve around the email library load. My latest revised code, taking last night's advisories, is now yielding: Call to undefined method CI_Email::email_from() for line 35, though I think am observing the suggested construction under the Email Function Reference heading on the CI User Guide Email Class page: Code: <?php This is all very confusing. I suppose the undefined method referred to by the error message is distinct from the email function, but where must I direct my attention in the User Guide to grasp this nuance and do the correct coding that will generate what is billed as a simple email send process?
[eluser]n0xie[/eluser]
[quote author="oldnews" date="1245536075"] Call to undefined method CI_Email::email_from() for line 35, though I think am observing the suggested construction under the Email Function Reference heading on the CI User Guide Email Class Code: $this->load->library('email'); See http://ellislab.com/codeigniter/user-gui...email.html Quote:Email Function Reference
[eluser]oldnews[/eluser]
Precisely! Then what coding mistake is causing the error, when, in the companion views/myform.php, these variables are set within the first 3 data fields? Code: <html> method == function or method != function?
[eluser]oldnews[/eluser]
Quote:One suggestion might be for you to use a view for your Email. Pass some variables into it, get the resulting page, and then stick it in your Email.advised theFuzzyOne Actually, I was thinking about a plain, non-CI-framework HTML email form with a standard, stand-alone PHP background companion, to process entry submissions. Is this what you meant, Fuzz? Or could you elaborate/clarify what it is you are suggesting?
[eluser]TheFuzzy0ne[/eluser]
Well my Emails are sent as HTML, so I'd have a view like this: Code: <p> Then from my controller, I should be able to grab the body of the email like this: Code: $email_body = $this->load->view('email', $data, TRUE); Then I can use that as the Email body, and configure the Email library accordingly. Hope this helps.
[eluser]oldnews[/eluser]
Thanks for clarifying, Fuzz. I see what you're doing. What I'm doing is somewhat different: strangers submitting contest entries which include an uploaded picture for a sponsor who requires data harvesting of several key fields. Late last night, I set up a work-around html email form with a background, non-CI, PHP companion handler that has worked fine on less complex contest sites. I wish you would try uploading a sample jpg on the CI-managed landing page. Then attempt to fill in that CI-managed form (controller code shown in my last publication several replies back on the first page), and when it fails, go to my work-around non-CI PHP email form that DOES execute. You may get a better sense for what needs to be accomplished WITH CI form validation. The site is not actually live, yet: we're still testing to try to get the handlers to do everything seemlessly. And, BTW, I know I can pass the variable (that's displayed in a text field) as hidden, but for testing purposes, I'm putting it out there in plain view for now. Thanks. All advice is welcome and appreciated. UploadPixMaverik.com
[eluser]n0xie[/eluser]
[quote author="oldnews" date="1245545099"]Precisely! Then what coding mistake is causing the error [/quote] Code: // your code Quote:method == function or method != function?http://nl3.php.net/manual/en/language.oop5.basic.php |
Welcome Guest, Not a member yet? Register Sign In |