The Form
CODE
<td background="images/con_mid.gif" width="463" height="389" align="justify" valign="top">
<p class="content">
Please fill in the following information:
</p>
<br />
<form name="MyForm" method="POST" action="index.php?pg=contact&act=mail&step=send">
<p class="contactm">
Your Name
<br />
<input name="name" type="text" size="45" maxlength="35" />
<br /> <br />
Your Email
<br />
<input name="email" type="text" size="45" maxlength="35" />
<br /> <br />
Your Message
<br />
<textarea name="content" cols="52" rows="10"></textarea>
<br /> <br />
<input type="hidden" name="id" value="$id" />
<img src="images/icon.gif" /> <a href="java script:document.MyForm.submit();" class="contactm">Submit</a>
</p>
</form>
<p class="content">
Emails sent to General, Advertising, Employment, and Legal will be read and replied to within 24 hours guaranteed.
<br /> <br />
<img align="middle" src="images/line_content.gif" />
</p>
</td>
<p class="content">
Please fill in the following information:
</p>
<br />
<form name="MyForm" method="POST" action="index.php?pg=contact&act=mail&step=send">
<p class="contactm">
Your Name
<br />
<input name="name" type="text" size="45" maxlength="35" />
<br /> <br />
Your Email
<br />
<input name="email" type="text" size="45" maxlength="35" />
<br /> <br />
Your Message
<br />
<textarea name="content" cols="52" rows="10"></textarea>
<br /> <br />
<input type="hidden" name="id" value="$id" />
<img src="images/icon.gif" /> <a href="java script:document.MyForm.submit();" class="contactm">Submit</a>
</p>
</form>
<p class="content">
Emails sent to General, Advertising, Employment, and Legal will be read and replied to within 24 hours guaranteed.
<br /> <br />
<img align="middle" src="images/line_content.gif" />
</p>
</td>
Sending It
CODE
<td background="images/con_mid.gif" width="463" height="389" align="justify" valign="top">
<br />
<?php
if ($id=0) {
$mto="admin@muargle.com";
} elseif ($id=1) {
$mto="advertise@muargle.com";
} elseif ($id=2) {
$mto="employment@muargle.com";
} elseif ($id=3) {
$mto="legal@muargle.com";
} elseif ($id=4) {
$mto="jeremy@muargle.com";
} elseif ($id=5) {
$mto="danish@muargle.com";
} elseif ($id=6) {
$mto="steven@muargle.com";
} elseif ($id=7) {
$mto="hal@muargle.com";
}
?>
<?php
if (empty($name)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} elseif (empty($email)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} elseif (empty($content)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} elseif (empty($id)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} else {
echo "<p class='content'>";
print ("Thanks! An email has been sent to our applications department with the information you submitted. You will recieve a call with more information on your application within 48 hours.");
echo "</p>";
$to = $mto;
$subject = "Message from Muargle Media";
$body = "
<br /> <br />
<b>$name</b> has sent you an email. Here is their message:
<br /> <br />
<br /> <br />
$content
<br /> <br />
<br /> <br />";
$from = $email;
mail($to,$subject,$body);
}
?>
<br /> <br />
<img align="middle" src="images/line_content.gif" />
</td>
<br />
<?php
if ($id=0) {
$mto="admin@muargle.com";
} elseif ($id=1) {
$mto="advertise@muargle.com";
} elseif ($id=2) {
$mto="employment@muargle.com";
} elseif ($id=3) {
$mto="legal@muargle.com";
} elseif ($id=4) {
$mto="jeremy@muargle.com";
} elseif ($id=5) {
$mto="danish@muargle.com";
} elseif ($id=6) {
$mto="steven@muargle.com";
} elseif ($id=7) {
$mto="hal@muargle.com";
}
?>
<?php
if (empty($name)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} elseif (empty($email)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} elseif (empty($content)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} elseif (empty($id)) {
echo "<p class='content'>";
echo "<font color='#FF0000'>";
echo "Sorry but there was an error. It seems you have not filled in all of the information needed. Please either <a href='java script:history.go(-1)'><b>Go Back</b></a> to review your form, or send a new one.";
echo "</font>";
echo "<p class='content'>
Please fill in the following information:
</p>
<br />
<form name='MyForm' method='POST' action='index.php?pg=contact&act=mail&step=send'>
<p class='contactm'>
Your Name
<br />
<input name='name' type='text' size='45' maxlength='35' />
<br /> <br />
Your Email
<br />
<input name='email' type='text' size='45' maxlength='35' />
<br /> <br />
Your Message
<br />
<textarea name='content' cols='52' rows='10'></textarea>
<br /> <br />
<input type='hidden' name='id' value='$id' />
<img src='images/icon.gif' /> <a href='java script:document.MyForm.submit();' class='contactm'>Submit</a>
</p>
</form>";
echo "</p>";
} else {
echo "<p class='content'>";
print ("Thanks! An email has been sent to our applications department with the information you submitted. You will recieve a call with more information on your application within 48 hours.");
echo "</p>";
$to = $mto;
$subject = "Message from Muargle Media";
$body = "
<br /> <br />
<b>$name</b> has sent you an email. Here is their message:
<br /> <br />
<br /> <br />
$content
<br /> <br />
<br /> <br />";
$from = $email;
mail($to,$subject,$body);
}
?>
<br /> <br />
<img align="middle" src="images/line_content.gif" />
</td>
There's no errors, it just won't send the mail out...
