Search
Left Quote    Maybe this world is another planet's Hell.
- Aldous Huxley    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: Comments sent to email
  This user is offline  toxic27
  Subject: "Comments sent to email" Posted: @ 7:51 am on Oct 19 2008   
Member #: 771
Rank: User - (4)
Since: 10/19/08
Posts: 4

With your comment script, is there any way I can have a notification sent to my email when a comment is made? Like I have a bunch of articles and reviews, each with its own comment area, and I want a notification to be sent to me when a comment is made. Thanks!


    Viewed: 10,633 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Comments sent to email" Posted: @ 8:45 pm on Oct 19 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Sure, just check out the PHP Mail Function .




-bs0d | AllSyntax.com

    Viewed: 10,619 Times | Reply to This | To top
  This user is offline  toxic27
  Subject: "re: Comments sent to email" Posted: @ 5:28 am on Oct 20 2008    
Member #: 771
Rank: User - (4)
Since: 10/19/08
Posts: 4

Alright, thanks! BTW, I love the code samples and tutorials you have so far!




    Viewed: 10,610 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Comments sent to email" Posted: @ 10:15 pm on Oct 20 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

No problem. Unfortunately I have not been able to make any new ones in quite a while due to work and school. But it looks like the site is still getting a few hits, so someone must be reading them.




-bs0d | AllSyntax.com

    Viewed: 10,599 Times | Reply to This | To top
  This user is offline  toxic27
  Subject: "re: Comments sent to email" Posted: @ 12:38 am on Oct 21 2008    
Member #: 771
Rank: User - (4)
Since: 10/19/08
Posts: 4

Yeah, this is a great site for different website "features "

Oh and one more little question. Is there anyway each comment can have a number (first comment=1, second comment=2, etc.)? I can't figure out how to put that in my MySQL Database. Thanks again.




    Viewed: 10,595 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Comments sent to email" Posted: @ 12:45 am on Oct 21 2008    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Well, the comments table has an "ID" ; column that is set to auto_increment, so each record will have a unique ID. That's the number you can grab for reference.




-bs0d | AllSyntax.com

    Viewed: 10,592 Times | Reply to This | To top
  This user is offline  toxic27
  Subject: "re: Comments sent to email" Posted: @ 1:19 am on Oct 21 2008    
Member #: 771
Rank: User - (4)
Since: 10/19/08
Posts: 4

Yeah I saw that but wasn't sure if it will start at the number 1 for each comment area (for each article, review, etc.) or if it would just continue one "chain&q uot; of numbers.




    Viewed: 10,589 Times | Reply to This | To top
  This user is offline  misterhaan
  Subject: "re: Comments sent to email" Posted: @ 2:22 pm on Oct 21 2008    

Member #: 5
Rank: User - (213)
Since: 02/11/05
Posts: 148
From: chair

it




please note that the above post is likely made up in its entirety.

    Viewed: 10,573 Times | Reply to This | To top
  This user is offline  Genius
  Subject: "re: Comments sent to email" Posted: @ 9:51 pm on Oct 23 2008    

Member #: 582
Rank: User - (77)
Since: 02/18/08
Posts: 76
From: kmmk

i have not looked into the comment script, but if you want script to email you whenever you got new comments, you could do something like this:

put this code after user successfully sends a comment


Code:


$to = "YOUR EMAIL WHERE YOU WANNA RECEIVE NOTIFICATIONS& quot;;
$from = "EMAIL THAT YOU WANT SCRIPT TO SEND FROM";
$subject = "Someone has posted a comment on article ".$articl e_name_variable ."" ;
$message = "Someone has posted a comment on article ".$articl e_name_variable ." click <a href=\"y oursite.com/art icles.php?id=& quot;.$article_ id_here." \">he re</a> to go there.";< br /> mail($to,$subje ct,$message);




    Viewed: 10,536 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank