Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Emails sent out from MSSQL database
Old 10-23-2006, 02:14 PM Emails sent out from MSSQL database
Junior Talker

Posts: 4
Name: Natasha Bryant
Trades: 0
Hi,

Please help I'm so lost. I don't know if I should put this here or in PHP forum so please forgive me if it shouldn't be here. I have this help desk I'm coding in PHP using a MSSQL databse. I have a user, rep and admin setup. On the admin side you can either add, delet or edit statuses, email messages, priorities, categories, and locations.

My issue is with the editing of the email. I want to have about 10 preset email messages in the database. Based on what the user does - i.e. Submit a new problem - I want the appropriate message to be sent via email to the user.

My delimna is how would I put the information from the submitted form or database into the email that is sent out.

So let's say for instance this is in the database:

Thank you for submitting your problem to the help desk. You can view or update the problem at: [uurl]
PROBLEM DETAILS
---------------
ID: [problemid]
User: [uid]
Date: [startdate]
Title: [title]
DESCRIPTION
-----------
[description]

How can I get the values out of the submitted form/database into the brackets.
misslilbit02 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-25-2006, 02:07 AM Re: Emails sent out from MSSQL database
Extreme Talker

Posts: 163
Name: James
Location: Australia
Trades: 0
My only guess is that you are making use of the PHP 'Mail' function.


Your detail is a little confusing?

Do you want, when a form is submited, for that to then send an email, to your own web sites email addresses to that of your admin staff.

And to have this email directed to a particular address, depending on what is in the form being submitted.

------- Step 1 ---------
The form page must ask, ~what is the purpose of this contact~
With Radio buttons, let them select from

+Complain about you
+I must contact the boss
+I need help to do Job type X
+I need help to do job type Y.


------- STEP 2 -------
The PHP program recieving this form, should then use the Switch Case statements.

If the responce is 'complain abuot you' Then, this must go to email address A.


When you get to the mail function, just use the variable in the 'who to send it to' column'.


-----------------
I hope this is of some help
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
Old 10-26-2006, 01:33 PM Re: Emails sent out from MSSQL database
Junior Talker

Posts: 4
Name: Natasha Bryant
Trades: 0
First, thanks for responding. Ok. This is just hard to explain. I have right now 4 different email meassages in my database. I would like to send out an email message automatically based on what the user does.

So my thoughts were to include the variables from the form being submitted in the email messages that are located in the database. Pull the message out of the database and mail the message using PHPmail function in the processing script file.

That doesn't work. The delimna is to get the information from the form and put it in the email that's going to be sent out to the user.

This is one of the messages in the database:

<?
mssql_query("INSERT INTO email(email_name, subject, email) VALUES ('User-New User Signup', 'Keiser Support - User Information',
'Thank you for signing up with Keiser Support. Please review your user information below: <br><br>
User Information: <br>
-----------------------------------<br>
User Name:'$e_user'<br>
First Name:'$first'<br>
Last Name:'$last'<br>
Email Address:'$email'<br>
Location:'$loc'<br>
Password:'$newpass'<br><br>

If any of your user information is incorrect you can log into Keiser Support and edit your account.<br>
Please do not respond to this email this is an unmonitored email address. Keep this information for your records.<br><br>
Regards,<br>
Keiser Support Team<br>')");

mssql_close($connect);
?>

Is that a better explanation?
misslilbit02 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Emails sent out from MSSQL database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.13486 seconds with 12 queries