Forum Moderators: coopster
I would like to have an e-mailed copy of the data which my visitors update a MySQL database with.
The existing code is below. I would like to add something underneath along the lines off 'Email a list of all the values q201-q204 to myemail@email.com in comma separated format'. This is just so I can keep an eye on what visitors are doing without having to check the mysql table manually.
Any suggestions? Thank you in advance.
mysql_select_db('quiz');
$query = "UPDATE quiz SET
stamp_i=NOW(),
q201='".$q201."',
q202='".$q202."',
q203='".$q203."',
q204='".$q204."' WHERE uname='".$uname."' ";
mail( 'myemail@mydomain.com', 'Insert Query', $query ); This would send an email to myemail@mydomain.com with the subject 'Insert Query' and the body of the message would be everything in the $query variable.