1
new_bie
tiny content help
  • 2005/10/17 21:01

  • new_bie

  • Just popping in

  • Posts: 92

  • Since: 2005/1/29


hi!
I am trying to add a simple php contact form in tinycontent and I don´t get feedback when I sent to myself ,I´ve changed the email settings to sendmail but it doesn´t work either..
Any suggestions!
thanks in advanced!
new_bie
ps.-I have an index.php as page wrap

<?

$form_block = "
<table border="0" cellpadding="0" cellspacing="0" id=text>
<FORM METHOD="post" ACTION="$PHP_SELF">
<tr><td height="20" align=center id=clientstitle>Diction Contact Form </td> </tr>
<tr>

<td height=20 > &nbsp; </td></tr>
<tr><tr><td >
<P><strong>Your Name:</strong><br>
<INPUT type="text" NAME="sender_name" VALUE="$sender_name" SIZE=30></p>

<P><strong>Your E-Mail Address:</strong><br>
<INPUT type="text" NAME="sender_email" VALUE="$sender_email" SIZE=30></p>

<P><strong>Company or Organization:</strong><br>
<INPUT type="text" NAME="sender_company" VALUE="$sender_company" SIZE=30></p>

<P><strong>Message:</strong><br>
<TEXTAREA NAME="message" COLS=30 ROWS=5 WRAP=virtual>$message</TEXTAREA></p>

<INPUT type="hidden" name="op" value="ds">

<P align=center><INPUT TYPE="submit" NAME="submit" VALUE="Send This Form" class=buttons></p>

</FORM>
</td></tr></table>



";

if ($op != "ds") {

// This are the error messages on the required fields you can add or delete
echo "$form_block";

} else if ($op == "ds") {

if ($sender_name == "") {
$name_err = "<font color=red>Please write your name!</font><br>";
$send = "no";
}

if ($sender_company == "") {
$email_err = "<font color=red>Please write the name of your company!</font><br>";
$send = "no";

}

if ($sender_email == "") {
$email_err = "<font color=red>Please write your e-mail!</font><br>";
$send = "no";
}


if ($message == "") {
$message_err = "<font color=red>Please write your message!</font><br>";
$send = "no";
}

if ($send != "no") {

// this is the info that comes on the email when it's ok to send!
$msg = "E-MAIL SENT FROMhttp://www.yoursite.net/contact/n";
$msg .= "Sender's Name: $sender_namen";
$msg .= "Sender's E-Mail: $sender_emailn";
$msg .= "Sender's Company: $sender_companyn";
$msg .= "Message: $messagenn";
$to = "mymail@company.com";
$subject = "Information";
$mailheaders = "From: Informationn n";
$mailheaders .= "Reply-To: $sender_emailnn";

mail($to, $subject, $msg, $mailheaders);
echo " <div align="center"><table width="400" border="0" cellspacing="0" cellpadding="0">";
echo " <tr><td height="20" colspan=2 >&nbsp;</td></tr>";


echo " <tr><td colspan=2 ><img src="thanks.gif" alt="thankyou"></td></tr>";
echo " <tr><td height="20" >&nbsp;</td></tr>";

echo " <tr><td width=10>&nbsp;</td><td id=text align=center>We will be back in touch with you within 24 hours thank you!</td> </tr></table></div>";
} else if ($send == "no") {

echo "$name_err";
echo "$email_err";
echo "$company_err";
echo "$message_err";
echo "$form_block";

}

}

?>

Login

Who's Online

116 user(s) are online (47 user(s) are browsing Support Forums)


Members: 0


Guests: 116


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits