CodeIgniter Forums
[SOLVED] Passing data out a database into a html e-mail - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: [SOLVED] Passing data out a database into a html e-mail (/showthread.php?tid=28679)



[SOLVED] Passing data out a database into a html e-mail - El Forum - 03-18-2010

[eluser]testietest[/eluser]
Hey people,

I have this form, which is being posted into a database. After the data is posted, a e-mail should be send to the person, that registered with some information they have filled into the form.

I do not really understand how this whole information gathering works ... Do I make a query in my controller and then via a foreach I put information in my html e-mail.

Thank you in advance.

With kind regards,

Wesley


[SOLVED] Passing data out a database into a html e-mail - El Forum - 03-18-2010

[eluser]n0xie[/eluser]
Put your email in a view. Pass all the database records to it like you would any normal html page. Then instead of outputting it to the browser, set it as message to the email class.


[SOLVED] Passing data out a database into a html e-mail - El Forum - 03-19-2010

[eluser]testietest[/eluser]
Thx n0xie, solved now