Page 1 of 1

contact form sends stuff with info@mydomain.com

Posted: Fri Dec 16, 2005 10:46 am
by soianyc
My contact form is a basic page, nothing fancy shmancy. Im getting replies to my email account with names that are a bunch of letters @mydomain.com. I have taken the script down because i was told they were spamming from my site. What do those emails mean.

Secondly do you guys know of a good contact form that you use. My php is very basic still and if you know of a tutorial that can help with contact pages it would be greatly appreciated.

BTW, my contact form consists of two seperate pages. One is the actual physical form which you write in your information

Code: Select all

<form action="sendmail.php" method="post" id="contact">
<p>Name:<br /><input name="name" type="text" id="name" /><br /></p>
<p>Email:<br/><input name="email" type="text" id="email" /><br /></p>
<p>Message:<br /><textarea name="message" id="message" rows="7" cols="25"></textarea>
<input type="image" src="pix/send.jpg" /></p>
</form>
This is the code of the second page which receives the info and sends it to my email address

Code: Select all

<?php
// Get submitted data
$name = $HTTP_POST_VARS['name'];
$email = 'From: '.$HTTP_POST_VARS['email'];
$message = $HTTP_POST_VARS['message'];

// Put data into readable format

$subject=date("l, F j, Y, g:i a") ;
$to = 'info@mydomain.com';
$body = "Name: $name \n 
$email \n
Message: \n \n $message";

// Send email
mail($to, $subject, $body, $email);
?>
Very basic indeed

appreciate all the help

Regards

soianyc

Hawley: Removed email from Subject Line