HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Email code
Post new topic   Reply to topic    HTML Help Forum Index -> PHP
View previous topic :: View next topic  
Author Message
gopi



Joined: 07 Feb 2008
Posts: 1

PostPosted: Thu Feb 07, 2008 3:28 am     Email code Reply with quote

Hi,

I want email code for HTML.in my CONTACT page i have text boxes like

Name, company name,designation,email id,phoneno,address

And i have submit and reset button..

Now if i enter the matter in that text box that matter comes into my email id..


What is PHP?
is we have to write email code in PHP.
Where we copy the code...

And also is it required any server for this...

Please send the code..

URGENT............

WAITING...........


Thanks & Regards
Gopichand
[/b]
thexpgeek



Joined: 13 Dec 2007
Posts: 24

PostPosted: Wed May 28, 2008 10:21 am     Reply with quote

here is one of my pages


Code:
<? include 'head.php' ?>
<? $pagename="Contact Us" ?>
<? include 'menu.php' ?>
<div id="content">
<center>
<h2>Contact</h2>
<?php
        $name=$_POST['name'];
        $em=$_POST['em'];
        $message=$_POST['message'];
        if ( $em == NULL ){
                $from="From: $name";
        }else{
                $from="From: $name <$em>";
                }
        If ( $message == Null || $name == NULL ){
                echo "If you have any question's/comments please fill out the form below<br><i><font size='-2'>Your email address is only required if you wish to receive a answer via email.</font></i><br>";
                echo "<form method=post target='_self'><br>";
                echo "<table align=center><tr><td>Ingame  Name</td><td><input type='text' name='name' value='$name'/></td></tr>";
                echo "<tr><td>Email Address</td><td><input type='text' name='em' value='$em'/></td></tr></table>";
                echo "Message:<br><textarea TYPE='text' NAME='message' wrap='virtual' rows='7' cols='40' />$message</textarea><br>";
                echo "<INPUT TYPE='submit' name='submit' value='Post'>";
                echo "</form><br>";
        }else{
                mail('youremailhere','Website Form',$message,$from);
                echo "Thank you for your email..<br>";
                }
        ?>
</center>
</div>
<? include 'footer.php' ?>
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> PHP All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial