php script for email

by MD on 2009/09/18


< html >
< body bgcolor = 'pink' >
<?php
    
if (isset($_REQUEST['email']))//if "email" is filled out, send email
    
{
        
//send email
        
$email $_REQUEST['email'] ;
        
$subject $_REQUEST['subject'] ;
        
$message $_REQUEST['message'] ;
        
mail("blog@posterous.com"$subject$message"From: $email" );
        echo 
"Thank you for using our mail form<p><A HREF='index.php'>Send Another mail</A>";
    }
    else
//if "email" is not filled out, display the form
    
{
        echo 
"<p><form method='post' action='index.php'><p>This mail is used for posting to <A HREF='http://mukeshdak76.wordpress.com'>http://mukeshdak76.wordpress.com</A>
            <p>Email: <input name='email' type='text' value='mukeshdak@gmail.com' size='60' /><br />
            <p>Subject: <input name='subject' type='text' size='60' /><br />
            <p>Message:<br />
            <textarea name='message' rows='20' cols='100'>
            </textarea><br />
            <p><input type='submit' />
            </form>"
;
    }
?>
< /body >
</html>

You may also like:

Leave a Comment

Previous post:

Next post: