Update database from a link in an email
Posted: Sat Jan 09, 2010 9:14 pm
I have a blog I have created and I recently built a comment section so users can make comments. Of course robots leave random comments and links which I don't want. Thus I have added a comment column to my database called "Approved" and mark it so approved comments are visible, otherwise the comments stay in the database but are unapproved and don't appear. Pretty standard.
The problem is this: Everytime someone leaves a comment, I get an email that a comment was left from using the mail function in php. I then have to manually sign into phpmyadmin and change the database to approve the comment. Is it possible for the email I receive to contain a link that changes the database for me? I mean, I think that would mean building a connection to the database in the email but that doesn't seem wise. I realize I could build another admin page but that is not ideal. I just want to click a link from the email itself and approve the comment so its visible. Is that possible?
The problem is this: Everytime someone leaves a comment, I get an email that a comment was left from using the mail function in php. I then have to manually sign into phpmyadmin and change the database to approve the comment. Is it possible for the email I receive to contain a link that changes the database for me? I mean, I think that would mean building a connection to the database in the email but that doesn't seem wise. I realize I could build another admin page but that is not ideal. I just want to click a link from the email itself and approve the comment so its visible. Is that possible?