Results 1 to 8 of 8

Thread: Help Needed!

  1. #1
    netweiser
    Guest
    i need a script which allows people to send email from mysite to me. like an email form / script. where can i get 1 frm?

  2. Software & Hardware   -   #2
    Poster
    Join Date
    May 2003
    Location
    Sheffield,UK
    Posts
    162
    try going to http://javascript.internet.com

    I think most web building software has it included but again try the site above.

  3. Software & Hardware   -   #3
    Poster
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    1,170
    Wow! Your website this your website that... is that all you can talk about?

  4. Software & Hardware   -   #4
    Poster
    Join Date
    May 2003
    Location
    Sheffield,UK
    Posts
    162
    Originally posted by Somebody1234@21 September 2003 - 19:56
    Wow! Your website this your website that... is that all you can talk about?

  5. Software & Hardware   -   #5
    netweiser
    Guest
    well when im working on mysite at the moment, yes thats all i really need 2 know. aint got much of a brain, dont wanna overload now do i

  6. Software & Hardware   -   #6
    Open a new text document, paste this code into it and save as contact.php - modify the contact form to whatever it should look, change the $sendto to your email address and upload the contact.php

    Done

    P.S: Dirty coded in 2 mins but should work fine

    Code:
    <?php
    
    $sendto="[email protected]";
    $subject="Cool - An email for me";
    $font_face_email="Arial";
    $font_size_email="2";
    
    if(!empty($_POST["message"]))
    {
    	$headers = "MIME-Version: 1.0\r\n"; 
    	$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    	$headers .= "FROM: ".$_POST["email"]." \r\n";
    	
    	$pre.="<font face=\"$font_face_email\" size=\"$font_size_email\" color=\"$font_color_email\">\n";
    	$pre.="===========SENDER'S DETAILS===========<br>\n";
    	
    	if($_POST["name"]!="")
    	{
     $pre.="Email from ".$_POST["name"].",<br>\n";
    	}
    	else
    	{
     $pre.="Email from ".$_POST["email"].",<br>\n";
    	}
    	
    
    	$body=ereg_replace("[\n]","<br>",$_POST["message"]);
    	$body=ereg_replace("[\\]","",$message);
    
    	mail($sendto, $subject, $pre."<br>\n\n".$body."\n", $headers);
    ?>
    <font face="Arial" size="2"><BR>Thank you<BR>
    Thank you for sending me an email
    <?php
    } else {
    ?>
    <html>
    
    <head>
    <title>Dirty Contact Form by Darker</title>
    </head>
    
    <body>
    
    <form method="POST" action="contact.php">
     <p>Name: <input type="text" name="name" size="20"></p>
     <p>Email: <input type="text" name="email" size="20"></p>
     <p>Message</p>
     <p><textarea rows="2" name="message" cols="20"></textarea></p>
     <p><input type="submit" value="Submit" name="Submit"></p>
    </form>
    
    </body>
    
    </html>
    <?php
    }
    ?>

  7. Software & Hardware   -   #7
    zapjb's Avatar Computer Abuser BT Rep: +3
    Join Date
    Nov 2002
    Posts
    3,606
    Somebody1234
    Posted: 21 September 2003 - 15:56

    Wow! Your website this your website that... is that all you can talk about?

  8. Software & Hardware   -   #8
    Originally posted by Darker@21 September 2003 - 15:11
    Open a new text document, paste this code into it and save as contact.php - modify the contact form to whatever it should look, change the $sendto to your email address and upload the contact.php

    Done

    P.S: Dirty coded in 2 mins but should work fine

    Code:
    <?php
    
    $sendto="[email protected]";
    $subject="Cool - An email for me";
    $font_face_email="Arial";
    $font_size_email="2";
    
    if(!empty($_POST["message"]))
    {
    	$headers = "MIME-Version: 1.0\r\n"; 
    	$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    	$headers .= "FROM: ".$_POST["email"]." \r\n";
    	
    	$pre.="<font face=\"$font_face_email\" size=\"$font_size_email\" color=\"$font_color_email\">\n";
    	$pre.="===========SENDER'S DETAILS===========<br>\n";
    	
    	if($_POST["name"]!="")
    	{
     $pre.="Email from ".$_POST["name"].",<br>\n";
    	}
    	else
    	{
     $pre.="Email from ".$_POST["email"].",<br>\n";
    	}
    	
    
    	$body=ereg_replace("[\n]","<br>",$_POST["message"]);
    	$body=ereg_replace("[\\]","",$message);
    
    	mail($sendto, $subject, $pre."<br>\n\n".$body."\n", $headers);
    ?>
    <font face="Arial" size="2"><BR>Thank you<BR>
    Thank you for sending me an email
    <?php
    } else {
    ?>
    <html>
    
    <head>
    <title>Dirty Contact Form by Darker</title>
    </head>
    
    <body>
    
    <form method="POST" action="contact.php">
     <p>Name: <input type="text" name="name" size="20"></p>
     <p>Email: <input type="text" name="email" size="20"></p>
     <p>Message</p>
     <p><textarea rows="2" name="message" cols="20"></textarea></p>
     <p><input type="submit" value="Submit" name="Submit"></p>
    </form>
    
    </body>
    
    </html>
    <?php
    }
    ?>
    Short and sweet! B)
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •