Contact form....

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey guys, so ive coded a sucessfull contact form before, but for some reason
this bit of code is giving me the run-arroundl....

so my HTML end is:


<form action="send.php" method="post" enctype="multipart/form-data">
             <table border="0" cellspacing="2" cellpadding="0">
                       <tr><td style="text-align:left;"> Send E-mail to:
</td>
                    <td><input type="radio" name="to" value="
bestudios.wb@xxxxxxxxx">General Information</td></tr>
                    <tr><td></td><td><input type="radio" name="to" value="
ajaganji@xxxxxxxxxxxxxxxx">Founder and President: Professor Ajagi Nji,
Ph.D</td></tr>
                    <tr><td></td><td><input type="radio" name="to" value="
dtanwani@xxxxxxxxxxxxxxxx">Executive Secretary: Dorothy Tah
Tanwani</td></tr>
                       <tr><td style="text-align:left;"> Name: </td>
                    <td><input type="text" name="name" size="40"></tr></td>
                     <tr><td style="text-align:left;">Subject: </td>
                    <td><input type="text" name="subject"
size="40"/></td></tr>
                       <tr><td style="text-align:left;">E-mail Address:
</td>
                    <td><input type="text" name="from" size="40"/></td></tr>
                       <tr><td style="text-align:left;">Message: </td>
                    <td><TEXTAREA NAME="message" COLS=31
ROWS=7></TEXTAREA></td></tr>
                    <tr><td></td><td style="text-align:center;">

</td></tr>
                       <tr><td colspan="2" style="text-align:right;"><input
type="submit" value="Send E-mail" name="submit" /></td></tr>
             </form></table>

and the file send.php is:

<?php

$subject =$_POST"subject";

$message=$_POST"message";

$name=$_POST"name";

$from=$_POST"from"

$mail_from=$_POST"from";

$to =$_POST"to";

$header = "From: {$name} < {$from} >";

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

if($send_contact){
echo "Thank you for Contacting Us!";
}
else {
echo "An error occurred while sending your message, review your information
and please try again.";
}
?>

when i go to test it out all i get back is a blank screen with: ";
$send_contact=mail($to,$subject,$message, $header); if($send_contact){ echo
"Thank you for Contacting Us!"; } else { echo "An error occured while
sending your message, review your information and please try again."; } ?>
on it... when i take out the like "
$header = "From: {$name} < {$from} >";" i just get a blank screen, but it
dosen't send the e-mail.... i know i'm missing something really obvious, but
i just can't see it.
Thanks,
Watson

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux