cinq
08-07-2004, 01:50 PM
Am planning to make use of this function to notify a member ( via email ) when someone comments on something he/she posted.
$subject= Email Notification: New Comment Posted';
$message="A new comment was posted. Please login to check.";
vbmail($vboptions['webmasteremail'], $subject, $message);
Now this code would send the email notification to the webmaster ( ie. me ).
But say this email notification was supposed to be sent to a member called "Helloworld", how can I pass it into the vbmail function , using his userid ?
Will this work ? :
( assuming data[userid] came from a query result )
$usersid = $data['userid'];
$user = fetch_userinfo($usersid);
$username = $user['username'];
$subject= Email Notification: New Comment Posted';
$message="A new comment was posted. Please login to check.";
vbmail($user['username'], $subject, $message);
Any advice would be much appreciated. :)
Thanks
$subject= Email Notification: New Comment Posted';
$message="A new comment was posted. Please login to check.";
vbmail($vboptions['webmasteremail'], $subject, $message);
Now this code would send the email notification to the webmaster ( ie. me ).
But say this email notification was supposed to be sent to a member called "Helloworld", how can I pass it into the vbmail function , using his userid ?
Will this work ? :
( assuming data[userid] came from a query result )
$usersid = $data['userid'];
$user = fetch_userinfo($usersid);
$username = $user['username'];
$subject= Email Notification: New Comment Posted';
$message="A new comment was posted. Please login to check.";
vbmail($user['username'], $subject, $message);
Any advice would be much appreciated. :)
Thanks