Is there a way to send an email notification if a certain page is visited?
(Triggers an email saying the page was viewed)
Ie. User comes to this page: t
Try:
<?php
// The message
$message = "Line 1\nLine 2\nLine 3";
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send
mail('admin@example.com', 'My Subject', $message);
// Redirect
header('Location: anotherpage.php');
?>
Yes. Just use this at any place in your page: PHP Mail
Yes, the mail function.
But I think you should reconsider this design - imagine what will happen if the page suddently gets hit by thousands upon thousands of users - or a buggy web crawler. A log file or database update is alot easier to handle.