Jump to content


Photo

MySQL Database management


  • Please log in to reply
4 replies to this topic

#1 hardhead04

hardhead04
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationUS

Posted 05 August 2003 - 07:22 PM

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

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 05 August 2003 - 09:03 PM

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.
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

#3 gandolf1212

gandolf1212
  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 05 August 2003 - 09:12 PM

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.

#4 hardhead04

hardhead04
  • New Members
  • Pip
  • Newbie
  • 6 posts
  • LocationUS

Posted 06 August 2003 - 04:52 PM

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

#5 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,017 posts

Posted 06 August 2003 - 05:10 PM

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
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users