{php}
if (!isset($_POST['submitForm'])) {
{/php}
Please fill out the form below regarding our advertising opportunities, and we'll get back to you within 24 hours. Thanks!
</td></tr></table><br /><br /><br />
<form method="post" action="advertise_form_send.php">
<table width="70%" cellpadding="{$config.cellpadding}" cellspacing="{$config.cellspacing}" border="0" align="center" style="text-align: center;">
<tr><td valign="top" width="30%">Name:<br /></td><td width="70%" valign="top"><input name="name" type="text"></td></tr>
<tr><td valign="top" width="30%">Company Name:<br /></td><td width="70%" valign="top"><input name="companyname" type="text"></td></tr>
<tr><td valign="top" width="30%">Email Address:<br /></td><td width="70%" valign="top"><input name="email" type="text"></td></tr>
<tr><td valign="top" width="30%">Message:<br /></td><td width="70%" valign="top"><textarea name="message" rows="15" cols="40"></textarea></td></tr>
<tr><td valign="top" width="30%"></td><td width="70%" valign="top"><input type="submit" name="Submit" alt="Submit"></td></tr>
</form>
{php}
} else {
echo "Form submitted!";
}
{/php}
Here is the form on my client's website: http://www.fullfigur...m/advertise.php
Now I do have some PHP code that I took from a site and modified accordingly, but it's not working. I don't get an error message, but I don't receive an email either.
Here's that PHP code on advertise_form_send.php:
<?php
if (isset($_REQUEST['email']))
//if "email" is filled out, send email
{
//send email
$email = $_POST['email'];
$message = $_POST['message'];
$name = $_POST['name'];
$companyname = $_POST['companyname'];
mail("ryanmiller406@gmail.com", "Advertisement Inquiry",
$message, "From: $email", "Name: $name", "Company Name: $companyname");
echo "Thank you for using our mail form";
}
else
//if "email" is not filled out, display error
{
echo "There was an error."
}
?>
To be honest I don't even know if that code is close to being right. All I know is that it's simply not working.
Thanks in advance!
This post has been edited by Ryanmiller: 22 June 2009 - 01:10 AM

New Topic/Question
Reply




MultiQuote




|