Current location: Hot Scripts Forums » Programming Languages » PHP » email notification


email notification

Reply
  #1 (permalink)  
Old 11-03-03, 02:12 PM
colincameron colincameron is offline
Newbie Coder
 
Join Date: Oct 2003
Location: Somewhere cold
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
email notification

i have a form that inserts new rows into my database.. is there a way i can put in my script that when the user submits there info, i get a email notifying me.?

thanks in advance =)
Reply With Quote
  #2 (permalink)  
Old 11-03-03, 02:44 PM
spinicrus spinicrus is offline
Newbie Coder
 
Join Date: Jun 2003
Location: else where
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Post you could...

at the end of your form you could just paste the code below and make the minor modifications like your email address and the redirect, if you need it.



<?php

$to = "your_email@server.com";

$redirect = "desired_page.html";

$extra = "From: $email\r\nReply-To: $email\r\n";
$mess = "Message from: ".$name.", IP: (".$REMOTE_ADDR.")\n\n".$message;
mail($to, $subject, $mess, $extra);
header("location: $redirect");

?>
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form to database to email BogoMips ASP 0 11-03-03 06:12 AM
Guestbook whit email notification? Jonas_wild Script Requests 1 10-28-03 05:06 AM
Preventing email form abuse LunarOrbit Perl 3 10-04-03 09:55 PM
Email notification.. UKSwift PHP 1 08-12-03 06:39 AM
How can I do a confirmation email for a database? ashur ASP 2 08-05-03 09:42 PM


All times are GMT -5. The time now is 07:23 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.