NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page script for form to email??

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 10-22-2005, 04:01 AM THREAD STARTER               #1 (permalink)
JH
NamePros Regular
Join Date: Jun 2005
Location: UK
Posts: 533
JH is a jewel in the roughJH is a jewel in the roughJH is a jewel in the rough
 



script for form to email??


hi,

dose anyone know a script to place on my site that will send form information to my email???
__________________
Joe or Joseph ???
JH is offline  
Old 10-22-2005, 05:19 AM   #2 (permalink)
NamePros Member
Join Date: Oct 2005
Posts: 73
CyberSpatium is an unknown quantity at this point
 



check hotscripts.com, sourceforge.net, freshmeat.net
CyberSpatium is offline  
Old 10-22-2005, 05:28 AM   #3 (permalink)
dre
NamePros Regular
Join Date: Jul 2005
Posts: 595
dre has a spectacular aura aboutdre has a spectacular aura about
 



PHP Code:
<? 

mail 
("email here""$subject","$message");
????: NamePros.com http://www.namepros.com/programming/133886-script-for-form-to-email.html

?>
dre is offline  
Old 10-22-2005, 06:47 AM   #4 (permalink)
Eating Pie
 
iNod's Avatar
Join Date: Nov 2004
Location: Canada
Posts: 2,272
iNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud ofiNod has much to be proud of
 


Special Olympics AIDS/HIV Cystic Fibrosis Save The Children Baby Health Cystic Fibrosis
Hello,

You can try http://mailaform.com

iNod
__________________
I feel old.
iNod is offline  
Old 10-22-2005, 07:49 AM THREAD STARTER               #5 (permalink)
JH
NamePros Regular
Join Date: Jun 2005
Location: UK
Posts: 533
JH is a jewel in the roughJH is a jewel in the roughJH is a jewel in the rough
 



cheers i will have a look
__________________
Joe or Joseph ???
JH is offline  
Old 10-24-2005, 11:34 AM   #6 (permalink)
Account Suspended
 
thomaslgates's Avatar
Join Date: Oct 2005
Location: India
Posts: 672
thomaslgates is just really nicethomaslgates is just really nicethomaslgates is just really nicethomaslgates is just really nice
 



I can program you one if you wish.

Originally Posted by CyberSpatium
check hotscripts.com, sourceforge.net, freshmeat.net
That is correct. These sites are preferable!
thomaslgates is offline  
Old 10-28-2005, 09:12 AM   #7 (permalink)
New Member
Join Date: Oct 2005
Posts: 21
oghost is an unknown quantity at this point
 



i say hotscripts.com is your best choice i got mines from there last time
oghost is offline  
Old 10-28-2005, 11:01 AM   #8 (permalink)
Senior Member
Join Date: May 2005
Location: Ontario Canada
Posts: 3,088
unknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to beholdunknowngiver is a splendid one to behold
 


Diabetes
its really easy...i can make 1 for u if u want
unknowngiver is offline  
Old 10-28-2005, 02:48 PM   #9 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Come up with one on the spot

PHP Code:
<?php

echo "<form method='post' action='".$_SERVER['PHP_SELF']."'>
Name:
<br>
<input type='text' name='name'>
<br>
E-mail:
<br>
<input type='text' name='email'>
<br>
Message:
<br>
<textarea name='message' rows='10' cols='40'></textarea>
<br>
<br>
<input type='submit' name='submit' value='Submit'>
</form>"
;

if(
$_POST['submit'])
{
  
$name $_POST['name'];
  
$email $_POST['email'];
  
$message $_POST['message'];
  
  if(empty(
$name) || empty($email) || empty($message))
????: NamePros.com http://www.namepros.com/showthread.php?t=133886
  {
    echo 
"All fields required. Please enter all information and try again.";
  }
  else
  {
    
$name stripslashes($name);
    
$message trim(stripslashes($message));
    
$message wordwrap($message70"<br>\n");

    
$recip "you@domain.com";
    
$subject "Message from yoursite.com";
????: NamePros.com http://www.namepros.com/showthread.php?t=133886

    
$headers 'From: '.$email.'';

    
mail("$recip""$subject","

    Name:
    
$name

    Email:
    
$email

    Message:
    
$message

  "
$headers);
  
  if(!
mail)
  {
    echo 
"Seems to have been a problem, your message could not be sent, please try again later."
  
}
  else
  {
    echo 
"Thank you, ".$name." for contacting us.";
  }
}
?>
It can be customized as well. If you require more data etc, should be easy to add the fields, etc...

-Eric
Eric is offline  
Old 10-28-2005, 03:16 PM   #10 (permalink)
DomainersUniversity.com
 
Gene's Avatar
Join Date: Feb 2005
Location: Oswego, NY
Posts: 4,735
Gene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond repute
 


Member of the Month
April 2005
Ethan Allen Fund Cancer Survivorship Baby Health Cystic Fibrosis Marrow Donor Program Parkinson's Disease Child Abuse Save a Life Animal Rescue Save a Life Save a Life Animal Rescue
Eric, if I just edited the email address and saved that code as contact.php, should it work as is? Or do I need to do something more? I tried it as is and get a 'Parse error line 57'.
__________________
.
.

Expired Domain Search -- ExpiredDomainBoss.com | Sell Domain Names -- DomainProfitsClub.com
-----------------------------------------------------------------------------------------------
Gene is offline  
Old 10-28-2005, 03:22 PM   #11 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Originally Posted by Gene
Eric, if I just edited the email address and saved that code as contact.php, should it work as is? Or do I need to do something more? I tried it as is and get a 'Parse error line 57'.
Yes, should work as is, and for the parse error (stupid me) missing a ; on this line:

PHP Code:
echo "Seems to have been a problem, your message could not be sent, please try again later." 
And it should be:

PHP Code:
echo "Seems to have been a problem, your message could not be sent, please try again later."
????: NamePros.com http://www.namepros.com/showthread.php?t=133886
Eric is offline  
Old 10-28-2005, 03:27 PM   #12 (permalink)
DomainersUniversity.com
 
Gene's Avatar
Join Date: Feb 2005
Location: Oswego, NY
Posts: 4,735
Gene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond repute
 


Member of the Month
April 2005
Ethan Allen Fund Cancer Survivorship Baby Health Cystic Fibrosis Marrow Donor Program Parkinson's Disease Child Abuse Save a Life Animal Rescue Save a Life Save a Life Animal Rescue
Hmm, now getting parse error on line 63 (last line).
__________________
.
.

Expired Domain Search -- ExpiredDomainBoss.com | Sell Domain Names -- DomainProfitsClub.com
-----------------------------------------------------------------------------------------------
Gene is offline  
Old 10-28-2005, 03:37 PM   #13 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Grrr, I need some sleep:

PHP Code:
<?php

echo "<form method='post' action='".$_SERVER['PHP_SELF']."'>
Name:
<br>
<input type='text' name='name'>
<br>
E-mail:
<br>
<input type='text' name='email'>
<br>
Message:
<br>
<textarea name='message' rows='10' cols='40'></textarea>
<br>
<br>
<input type='submit' name='submit' value='Submit'>
</form>"
;

if(
$_POST['submit'])
{
  
$name $_POST['name'];
  
$email $_POST['email'];
  
$message $_POST['message'];
  
  if(empty(
$name) || empty($email) || empty($message))
  {
    echo 
"All fields required. Please enter all information and try again.";
  }
  else
  {
    
$name stripslashes($name);
    
$message trim(stripslashes($message));
    
$message wordwrap($message70"<br>\n");

    
$recip "you@domain.com";
    
$subject "Message from yoursite.com";

    
$headers 'From: '.$email.'';

    
mail("$recip""$subject","
????: NamePros.com http://www.namepros.com/showthread.php?t=133886

    Name:
    
$name

    Email:
    
$email

    Message:
    
$message

  "
$headers);
  
  if(!
mail)
????: NamePros.com http://www.namepros.com/showthread.php?t=133886
  {
    echo 
"Seems to have been a problem, your message could not be sent, please try again later.";
  }
  else
  {
    echo 
"Thank you, ".$name." for contacting us.";
  }
}
}
?>
Eric is offline  
Old 10-28-2005, 03:42 PM   #14 (permalink)
DomainersUniversity.com
 
Gene's Avatar
Join Date: Feb 2005
Location: Oswego, NY
Posts: 4,735
Gene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond reputeGene has a reputation beyond repute
 


Member of the Month
April 2005
Ethan Allen Fund Cancer Survivorship Baby Health Cystic Fibrosis Marrow Donor Program Parkinson's Disease Child Abuse Save a Life Animal Rescue Save a Life Save a Life Animal Rescue
BINGO! Works like a charm. Thank you!
__________________
.
.

Expired Domain Search -- ExpiredDomainBoss.com | Sell Domain Names -- DomainProfitsClub.com
-----------------------------------------------------------------------------------------------
Gene is offline  
Old 10-28-2005, 03:44 PM   #15 (permalink)
Senior Member
 
Eric's Avatar
Join Date: Mar 2005
Posts: 4,948
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
Originally Posted by Gene
BINGO! Works like a charm. Thank you!
No problem And like I said, it can easily be customized for more fields and what not. If you need any added (anyone) let me know and I'll add them.
Eric is offline  
Closed Thread


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
npcharity??? robertjr Warnings & Alerts 24 10-30-2005 10:35 AM
Email script? nicedomain4sale Programming 8 06-18-2005 06:08 PM
web based email script Tjobbe Web Design Discussion 4 04-17-2004 07:45 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:05 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger