| View previous topic :: View next topic |
| Author |
Message |
Colocation Site Admin

Joined: Jan 07, 2004 Posts: 404
|
Posted: Tue Feb 10, 2004 7:51 pm Post subject: Combining Two Databases |
|
|
I have two databases, one is for nuke itself which is standard. The second is a mailing list which is subscribed to by using the following html form:
| Code: |
<form action=http://www.widjets.com/cgi-bin/widjets/submit.pl method=post >
<table>
<tr><td>Your Name<td><input type=text name=name>
<tr><td>Email Address<td><input type=text name=email_REQUIRED>
<input type=hidden name=username value=widjects> </table><br><br>* Denotes a required field<br><br><input type=submit value='Sign me up'></form><br> |
The task is to now combine this, so when user "A" creates a member account in nuke, this form is also triggered in order to set them into the third part newsletter.
Is this something for the Your_Account module?
Thanks. |
|
| Back to top |
|
 |
Colocation Site Admin

Joined: Jan 07, 2004 Posts: 404
|
Posted: Sat Feb 14, 2004 5:33 am Post subject: Finish User Function for Sending Additional Mail |
|
|
After discussions with the php doctor it was found that the mailing database can be initiated simply by sending an e-mail.
Therefore the function finishNewUser in the modules/Your_Account/index.php was modified to include this code:
| Code: |
| mail("widjets@widjets.com", "sign me up", "sign me up", "From: $user_email"); |
That was added on a new line right after this:
| Code: |
| mail($user_email, $subject, $message, "From: $from\nX-Mailer: PHP/" . phpversion()); |
Now when a user signs up for nuke they get entered into nuke's database as normal and also into the third party database for newsletter purposes. This could be extended to as many extra databases as required (futher niche products) by adding more lines. |
|
| Back to top |
|
 |
|