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
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
 
When You Register, These Ads Go Away!
Old 10-25-2006, 02:07 AM Re: Emails sent out from MSSQL database
Skilled Talker

Posts: 61
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
 
Old 10-26-2006, 01:33 PM Re: Emails sent out from MSSQL database
Junior Talker

Posts: 4
Name: Natasha Bryant
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

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

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


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


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

 


Page generated in 0.12367 seconds with 12 queries