Jump to content

Archived

This topic is now archived and is closed to further replies.

hardhead04

MySQL Database management

Recommended Posts

What is the most efficient and convienent way that i can be notified when my database has been modified (\"when a person fills out my form on the site\"). Can my database email me or something. please give me suggestions. thanx

Share this post


Link to post
Share on other sites

It\'s easy too get the script that process the submited form to email you when the the data is received and the database updated.

 

See php mail() function.

Share this post


Link to post
Share on other sites

If you want an email sent when a person fills out a form on your site then you should proabably send the email on the script that the form submits too. In php you use the mail() function. I don\'t think there is a way to have thedatabase send mail when a change occurs, but it\'s not nessesary because mySQL is just used to store data, scripts provide a gateway to it, and that is where the actions should occur.

Share this post


Link to post
Share on other sites

alright in my mail() function i have a $BODY Variable

 

is there a way that i could add multiple variables to this variable for example:

 

$Body = \"High my name is\", $ _POST[\'name\']

 

this code does not work but this is an example of what im trying to do. i hope yall understand this

Share this post


Link to post
Share on other sites

As many as you like.

 

For example, ou might want something like

 

$[php:1:6b1d98c71d]<?php

datetime = date(\'d m Y H:i\');

$name = $_POST[\'name\'];

$body = \"$name submitted a form at $date\";

?>[/php:1:6b1d98c71d]

 

hth

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.