Register in Joomla + post data to another table?

ronze 25 Aug, 2008
Hey everyone

I have installed the ccNewsletter component in Joomla.

I was wondering whether it was possible to make a form that registers a user in Joomla (as I do now) AND put the name and email into the ccNewsletter user table IF a "subscribe" checkbox has been checked?

Thanks - Rune
GreyHead 25 Aug, 2008
Hi Rune,

Yes, you can do that - probably needs some custom php in the Autogenerated box to write the extra table info.

Bob
ronze 25 Aug, 2008
Thanks a lot... that's no problem. Just needed to know where to look :-)
ronze 26 Aug, 2008
Hey again

Can anyone post some code on how to do this?

Let's say I just want to put $_POST["username"] and $_POST["email"] into columns "username" and "email" in a table called "newsletter"?
Max_admin 26 Aug, 2008
Hi ronze, which Chronofroms version do you have ?
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ronze 26 Aug, 2008
Hey

I use version 3.0 J1.5 BETA 2

Thanks!
Max_admin 26 Aug, 2008
Good, choose the newsletter table as one of the DB connection tables and once you submit a record will be inserted automatically to this table, if your table has columns with names similar to posted fields names then those columns will be loaded with posted values which what you need!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
ronze 27 Aug, 2008
Ok, thanks!

But what if I select 2 tables, where both have a column named "email" that I want the email to be stored in?

Will it post to both the tables?
Max_admin 27 Aug, 2008
yes
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.