View Single Post
  #1  
Old 01-23-2006, 06:27 PM
navysea| is offline navysea|
Registered User

Join Date: Jul 2004
Posts: 84

problem with contact form

Hey everyone sry i havent been round much been busy with school finals!
ok so im having trouble with a contact form in PHP

here is my contact form file:
PHP Code:
<form action="send_contact.php" method="POST">

Your Name:<br /><input type='text' name='name'><br />

Type of site:<br /><input type='text' name='type'><br />

Color Scheme:<br /><input type='text' name='colors'><br />

Email:<br /><input type='text' name='email'><br />

Message:<br /><textarea cols='50' rows='10' name='message'></textarea><br />

<
input type='submit' value='Send!'><input type="reset" name="reset" value="Reset"
ok and here is my sendcontact.php file
PHP Code:
<?php
// Contact subject
$subject ="$name";

// Details
$message="$type /n $colors /n $message";

// Mail of sender
$mail_from="$email";
// From
$header="from: $name <$mail_from>";

// Enter your email address
$to ='someone@somewhere.com';

$send_contact=mail($to,$subject,$message,$header);

// Check, if message sent to your email
// display message "We've recived your information"
if($send_contact){
echo 
"We've recived your contact information";
}
else {
echo 
"There was a problem while trying to send the information. Please try again.";
}
?>
Ok now my problem is a few things it says that it sends the information but when i check my email nothing is there and yes ive sent fake emails from other email address and i refresh and they show up but the contact form does not.

OK and my next question...
How do i get the type of site, color scheme, and message all to be the acutal message when i read the email?
__________________

Reply With Quote