Mail Form Help

  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 20th, 2006, 5:58 am

i am using the code below for my mailform, can someone provide me with the script to require the fields to be filled in.
also is there a way to mask your email so noone can see it?
and lastly, i noticed when you just go to the site this is on it sends me a blank email. probably because there is no if statement, and i don't know how to write it.
If someone could help out with these three things i would greatly appreciate it.
thanks

Code: [ Download ] [ Select ]
<?

$toemail = "my email@gmail.com";

$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$subject = $_REQUEST['subject'] ;
$name = $_REQUEST['name'] ;

mail( $toemail, $subject, $message, "From: $name <$email>" );

?>

<table> 
<form method="post" action="contact.php" name="contactform">  Subject:  <select name="subject">
<option value="FS_Contact" selected>Contact FutileSoul
<option value="FS_SubmitStuff" selected>Submit Stuff to FutileSoul Blog
<option value="FS_Account_only" selected>Get account with $25 bonus
<option value="FS_Account_Register">Get account with $25 bonus and register for next tourney
<option value="FS_Register">Register for next tourney 
</option> 
<td>Name:</td>
<td><input name="name" type="text"></td> </tr>
<tr> <td>Email:</td> 
<td><input name="email" type="text"></td> </tr>
<tr> <td>Message:</td> <td><textarea name="message" rows=10 cols=30></textarea></td> </tr>
<tr> <td></td> </select></td> </tr> <tr> <td>&nbsp;</td>
<td><input type="submit" value="Send Message"></td> </tr> </form> </table>
  1. <?
  2. $toemail = "my email@gmail.com";
  3. $email = $_REQUEST['email'] ;
  4. $message = $_REQUEST['message'] ;
  5. $subject = $_REQUEST['subject'] ;
  6. $name = $_REQUEST['name'] ;
  7. mail( $toemail, $subject, $message, "From: $name <$email>" );
  8. ?>
  9. <table> 
  10. <form method="post" action="contact.php" name="contactform">  Subject:  <select name="subject">
  11. <option value="FS_Contact" selected>Contact FutileSoul
  12. <option value="FS_SubmitStuff" selected>Submit Stuff to FutileSoul Blog
  13. <option value="FS_Account_only" selected>Get account with $25 bonus
  14. <option value="FS_Account_Register">Get account with $25 bonus and register for next tourney
  15. <option value="FS_Register">Register for next tourney 
  16. </option> 
  17. <td>Name:</td>
  18. <td><input name="name" type="text"></td> </tr>
  19. <tr> <td>Email:</td> 
  20. <td><input name="email" type="text"></td> </tr>
  21. <tr> <td>Message:</td> <td><textarea name="message" rows=10 cols=30></textarea></td> </tr>
  22. <tr> <td></td> </select></td> </tr> <tr> <td>&nbsp;</td>
  23. <td><input type="submit" value="Send Message"></td> </tr> </form> </table>
[/code]
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post January 20th, 2006, 5:58 am

  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 20th, 2006, 10:45 am

when i add this following code, instead of just having the mail() my page does not load. whats the problem? is what i have below exactly what i need to add?

Code: [ Download ] [ Select ]

if ($email != ''){
mail( $toemail, $subject, $message, "From: $name <$email>" );
} else {
$message = "Your form has been submitted."

  1. if ($email != ''){
  2. mail( $toemail, $subject, $message, "From: $name <$email>" );
  3. } else {
  4. $message = "Your form has been submitted."
  • typhon
  • Guru
  • Guru
  • User avatar
  • Joined: Oct 25, 2004
  • Posts: 1268
  • Loc: Memphis, Tn
  • Status: Offline

Post January 20th, 2006, 12:32 pm

Im willing to share.
This is the code for the form itself
Code: [ Download ] [ Select ]
<div align="center">
<form action = "index.php?target=sendmail" method="post">
<table>
<tr><td align="right">* First Name:</td><td align="right"><input type="text" name="first"></td></tr>
<tr><td align="right">* Last Name:</td><td align="right"><input type="text" name="last"></td></tr>
<tr><td align="right">* Email:</td><td align="right"><input type="text" name="email"></td></tr>
<tr><td colspan="2"><br>* Concerning:<br>
<ul class="form">
<li><input type="radio" name="subject" value="picnics">Picnics</li>
<li><input type="radio" name="subject" value="bday">Birthday Parties</li>
<li><input type="radio" name="subject" value="groups">Group Rates</li>
<li><input type="radio" name="subject" value="general">General Info</li>
<br><br>
</td></tr>
<tr><td colspan="2">Comment:<br>
<textarea rows="10" cols="30" name ="comment"></textarea><br><br>
<input type="submit" value="Contact Us"> <input type="reset"value="Reset">
</form>
</td></tr></table>
</div>
  1. <div align="center">
  2. <form action = "index.php?target=sendmail" method="post">
  3. <table>
  4. <tr><td align="right">* First Name:</td><td align="right"><input type="text" name="first"></td></tr>
  5. <tr><td align="right">* Last Name:</td><td align="right"><input type="text" name="last"></td></tr>
  6. <tr><td align="right">* Email:</td><td align="right"><input type="text" name="email"></td></tr>
  7. <tr><td colspan="2"><br>* Concerning:<br>
  8. <ul class="form">
  9. <li><input type="radio" name="subject" value="picnics">Picnics</li>
  10. <li><input type="radio" name="subject" value="bday">Birthday Parties</li>
  11. <li><input type="radio" name="subject" value="groups">Group Rates</li>
  12. <li><input type="radio" name="subject" value="general">General Info</li>
  13. <br><br>
  14. </td></tr>
  15. <tr><td colspan="2">Comment:<br>
  16. <textarea rows="10" cols="30" name ="comment"></textarea><br><br>
  17. <input type="submit" value="Contact Us"> <input type="reset"value="Reset">
  18. </form>
  19. </td></tr></table>
  20. </div>


This is the code that sends me an email
Code: [ Download ] [ Select ]
<?php
// Setting up the variables for php mail()
if (!$_POST['first'] || !$_POST['last'] || !$_POST['email']|| !$_POST['subject']) {
die('You did not fill in a required field.');
}
$first = $_POST['first'];
$last = $_POST['last'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$comment = $_POST['comment'];
$headers = "From: $first $last <contact_form@your_domain.com>";
//echo "! $first !";
//echo "! $last !";
//echo "! $email !";
//echo "! $subject !";
//echo "! $comment !";
// The message
$addr = "your_email@your_domain.com";
$subject ="Contact form Submision RE:" . " " . $subject;
$message = "Do not reply to this. It is from the contact form\n" . "Name :\n" . $first . " " . $last . "\n" . "Email:\n" . $email . "\n" . "Comment:\n" . $comment;
$message = wordwrap($message, 70);
// Send
mail ($addr, $subject, $message, $headers);
?>

Thank you for filling out our contact form.
  1. <?php
  2. // Setting up the variables for php mail()
  3. if (!$_POST['first'] || !$_POST['last'] || !$_POST['email']|| !$_POST['subject']) {
  4. die('You did not fill in a required field.');
  5. }
  6. $first = $_POST['first'];
  7. $last = $_POST['last'];
  8. $email = $_POST['email'];
  9. $subject = $_POST['subject'];
  10. $comment = $_POST['comment'];
  11. $headers = "From: $first $last <contact_form@your_domain.com>";
  12. //echo "! $first !";
  13. //echo "! $last !";
  14. //echo "! $email !";
  15. //echo "! $subject !";
  16. //echo "! $comment !";
  17. // The message
  18. $addr = "your_email@your_domain.com";
  19. $subject ="Contact form Submision RE:" . " " . $subject;
  20. $message = "Do not reply to this. It is from the contact form\n" . "Name :\n" . $first . " " . $last . "\n" . "Email:\n" . $email . "\n" . "Comment:\n" . $comment;
  21. $message = wordwrap($message, 70);
  22. // Send
  23. mail ($addr, $subject, $message, $headers);
  24. ?>
  25. Thank you for filling out our contact form.


This sends an email to the email you specify with the from field being 'contactform' and its somewhat formatted.

Of course you need to edit the email addresses inthis code to match those of your own.
-- Never hold a cat and a hairdryer at the same time.
  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 21st, 2006, 9:39 am

when i put this code on that page, all i get is "You did not fill in a required field."
  • typhon
  • Guru
  • Guru
  • User avatar
  • Joined: Oct 25, 2004
  • Posts: 1268
  • Loc: Memphis, Tn
  • Status: Offline

Post January 21st, 2006, 9:43 am

You dont get a form that you need to fill out? And if you do the first, last, email, and subject are all required. The only thing that isnt required is the comment area. And of course you can change the options in the subject to more suit your needs. The second part of that code should actually be in a file named 'sendmail.php'
-- Never hold a cat and a hairdryer at the same time.
  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 22nd, 2006, 9:11 pm

i left the code exactly how you gave it, only changing the $addr. it will not work. i get the form to come up, if i leave fields empty, nothing happens, if i fill everything out and send it, i get no emails. Here is the site that it is on, maybe that will help. http://futilesoul.smoothmatic.com/contact/index.php
  • typhon
  • Guru
  • Guru
  • User avatar
  • Joined: Oct 25, 2004
  • Posts: 1268
  • Loc: Memphis, Tn
  • Status: Offline

Post January 23rd, 2006, 1:27 am

try this

change
Code: [ Download ] [ Select ]
<form action = "index.php?target=sendmail" method="post">

to

Code: [ Download ] [ Select ]
<form action = "sendmail.php" method="post">

also you might want to either remove the

Code: [ Download ] [ Select ]
<tr><td colspan="2"><br>* Concerning:<br>
<ul class="form">
<li><input type="radio" name="subject" value="picnics">Picnics</li>
<li><input type="radio" name="subject" value="bday">Birthday Parties</li>
<li><input type="radio" name="subject" value="groups">Group Rates</li>

<li><input type="radio" name="subject" value="general">General Info</li>
<br><br>
</td></tr>
  1. <tr><td colspan="2"><br>* Concerning:<br>
  2. <ul class="form">
  3. <li><input type="radio" name="subject" value="picnics">Picnics</li>
  4. <li><input type="radio" name="subject" value="bday">Birthday Parties</li>
  5. <li><input type="radio" name="subject" value="groups">Group Rates</li>
  6. <li><input type="radio" name="subject" value="general">General Info</li>
  7. <br><br>
  8. </td></tr>



or edit the options to more closely match your sites. That is if the first suggestion fixes it. Sorry about that. The way I have my sites set up is using index.php?target=database_data
I forgot that was the way I had the action set. let me know if that worked.
-- Never hold a cat and a hairdryer at the same time.
  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 23rd, 2006, 4:55 am

I still don't receive the emails, but the require fields and the page after submitting the form both work.

Post January 23rd, 2006, 5:35 am

I reckon your just trying to do too much on one page, he's how I would go about

take all the php of the page with the form

change the from line in the page to

action="contactSubmit.php"

now create a page called contactSubmit.php

add your php code there (this isn't a perfect solution no error checking etc.) but it's quick easy and will have you up and running in minutes
  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 23rd, 2006, 5:51 am

that is what i already have done. i have the page with the form contact.php and the page with the php sendmail.php
http://futilesoul.smoothmatic.com/contact/contact.php

I have the following on contact.php
Code: [ Download ] [ Select ]
<div align="center">
<form action = "sendmail.php" method="post">
<table>
<tr><td align="right">* Name:</td><td align="right"><input type="text" name="name"></td></tr>
<tr><td align="right">* Email:</td><td align="right"><input type="text" name="email"></td></tr>
<tr><td colspan="2"><br>* Concerning:<br>
<ul class="form">
<li><input type="radio" name="subject" value="FutileSoul_Contact">Contact FutileSoul</li>
<li><input type="radio" name="subject" value="FutileSoul_SubmitStuff">Submit Stuff for the FutileSoul Blog</li>
<li><input type="radio" name="subject" value="FutileSoul_InfoQuestions">Poker Tournament Info/Questions</li>
<li><input type="radio" name="subject" value="FutileSoul_TournamentRegistration">SignUp for upcoming Poker Tournament</li>
<br><br>
</td></tr>
<tr><td colspan="2">Message:<br>
<textarea rows="10" cols="30" name ="comment"></textarea><br><br>
<input type="submit" value="Contact Us"> <input type="reset"value="Reset">
</form>
</td></tr></table>
</div>
  1. <div align="center">
  2. <form action = "sendmail.php" method="post">
  3. <table>
  4. <tr><td align="right">* Name:</td><td align="right"><input type="text" name="name"></td></tr>
  5. <tr><td align="right">* Email:</td><td align="right"><input type="text" name="email"></td></tr>
  6. <tr><td colspan="2"><br>* Concerning:<br>
  7. <ul class="form">
  8. <li><input type="radio" name="subject" value="FutileSoul_Contact">Contact FutileSoul</li>
  9. <li><input type="radio" name="subject" value="FutileSoul_SubmitStuff">Submit Stuff for the FutileSoul Blog</li>
  10. <li><input type="radio" name="subject" value="FutileSoul_InfoQuestions">Poker Tournament Info/Questions</li>
  11. <li><input type="radio" name="subject" value="FutileSoul_TournamentRegistration">SignUp for upcoming Poker Tournament</li>
  12. <br><br>
  13. </td></tr>
  14. <tr><td colspan="2">Message:<br>
  15. <textarea rows="10" cols="30" name ="comment"></textarea><br><br>
  16. <input type="submit" value="Contact Us"> <input type="reset"value="Reset">
  17. </form>
  18. </td></tr></table>
  19. </div>


and on sendmail.php i have...
Code: [ Download ] [ Select ]
<?
if (!$_POST['name'] || !$_POST['email']|| !$_POST['subject']) {
die('You did not fill in a required field.');

$toemail = "futile.soul.admin@gmail.com";

$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;



mail( $toemail, $subject, $message, "From: $name <$email>" );

?>

Thank You, we will get back to you as soon as possible.
<a href="http://futilesoul.coconia.net/blog">Back to Blog</a>
  1. <?
  2. if (!$_POST['name'] || !$_POST['email']|| !$_POST['subject']) {
  3. die('You did not fill in a required field.');
  4. $toemail = "futile.soul.admin@gmail.com";
  5. $name = $_REQUEST['name'] ;
  6. $email = $_REQUEST['email'] ;
  7. $subject = $_REQUEST['subject'] ;
  8. $message = $_REQUEST['message'] ;
  9. mail( $toemail, $subject, $message, "From: $name <$email>" );
  10. ?>
  11. Thank You, we will get back to you as soon as possible.
  12. <a href="http://futilesoul.coconia.net/blog">Back to Blog</a>

Post January 23rd, 2006, 6:48 am

is the problem fixed then or what is the problem your having (I just tested it and as far as I can tell it worked, at least superficially)
  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 23rd, 2006, 6:49 am

everything appears to work, but i don't receive the emails, i have sent many emails through the form and it won't work

Post January 23rd, 2006, 6:58 am

at the risk of sounding stupid have you tested the address

futile.soul.admin@gmail.com

maybe try sending it an email from a hotmail account
  • FutileSoul
  • Beginner
  • Beginner
  • User avatar
  • Joined: Jan 20, 2006
  • Posts: 63
  • Loc: Michigan, USA
  • Status: Offline

Post January 23rd, 2006, 7:15 am

i changed the email to a hotmail account, still no emails are making it to me. why wouldn't a gmail account work?
  • meman
  • Web Master
  • Web Master
  • User avatar
  • Joined: Aug 03, 2004
  • Posts: 3432
  • Loc: London Town , Apples and pears and all that crap
  • Status: Offline

Post January 23rd, 2006, 8:03 am

This is a contact form i made yesterday, I havn't tested it or anything, could give it a go.

The problem may be your host, do they have mail() enabled?

emailme.php
Code: [ Download ] [ Select ]
<center>


<div id="divContent" style="padding: 20px 20px 10px 40px;">
    <h1>Contact the webmaster of TYF</h1>
    <form name="f" method="post" action="contact.php">

        <table>
<tr>
<th>Subject:</th>
<td><select name="reason" onChange="MM_jumpMenu">
<option value="1" >Regarding Advertising on TYF</option>
<option value="2" >Regarding Directory</option>
<option value="3" >Regarding Hit Counter</option>
<option value="4" >Regarding Article Directory</option>
<option value="5" >General Enquiry</option>
</select>
</td>
</tr>

            <tr>
                <th>Name:</th>
                <td><input type="text" name="from" size="40"></td>
            </tr>
            <tr>
                <th>E-mail:</th>
                <td><input type="text" name="semail" size="40"></td>
            </tr>

            <tr>

                <th>Message:</th>
                <td><textarea rows="10" name="message" cols="40"></textarea></td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center">
                <input type="submit" value="Send Message" name="submit"></td>
            </tr>

        </table>
    </form>

<br>
</center>
  1. <center>
  2. <div id="divContent" style="padding: 20px 20px 10px 40px;">
  3.     <h1>Contact the webmaster of TYF</h1>
  4.     <form name="f" method="post" action="contact.php">
  5.         <table>
  6. <tr>
  7. <th>Subject:</th>
  8. <td><select name="reason" onChange="MM_jumpMenu">
  9. <option value="1" >Regarding Advertising on TYF</option>
  10. <option value="2" >Regarding Directory</option>
  11. <option value="3" >Regarding Hit Counter</option>
  12. <option value="4" >Regarding Article Directory</option>
  13. <option value="5" >General Enquiry</option>
  14. </select>
  15. </td>
  16. </tr>
  17.             <tr>
  18.                 <th>Name:</th>
  19.                 <td><input type="text" name="from" size="40"></td>
  20.             </tr>
  21.             <tr>
  22.                 <th>E-mail:</th>
  23.                 <td><input type="text" name="semail" size="40"></td>
  24.             </tr>
  25.             <tr>
  26.                 <th>Message:</th>
  27.                 <td><textarea rows="10" name="message" cols="40"></textarea></td>
  28.             </tr>
  29.             <tr>
  30.                 <td colspan="2" style="text-align: center">
  31.                 <input type="submit" value="Send Message" name="submit"></td>
  32.             </tr>
  33.         </table>
  34.     </form>
  35. <br>
  36. </center>


contact.php
PHP Code: [ Download ] [ Select ]
<html>
 
<head>
 
<title>Thanks for the Email!</title>
 
</head>
 
<body bgcolor="#ffffff">
 
 
 
<?
 
 
 
$message = trim(strip_tags( $_POST['message']));
 
$name = trim(strip_tags( $_POST['from']));
 
$senderemail = trim(strip_tags( $_POST['semail']));
 
$subject = trim(strip_tags( $_POST['reason']));
 
 
 
if($suject = "1")
 
{
 
$s = "Regarding Advertising on TYF";
 
}
 
if($suject = "2")
 
{
 
$s = "Regarding Directory";
 
}
 
if($suject = "3")
 
{
 
$s = "Regarding Hit Counter";
 
}
 
if($suject = "4")
 
{
 
$s = "Regarding Article Directory";
 
}
 
if($suject = "5")
 
{
 
$s = "General Enquiry";
 
}
 
 
 
 
 
$ip = $_SERVER['REMOTE_ADDR'];
 
 
 
 
 
 
 
$recipients = "you@your-domain.com"; // Your email addy
 
 
 
$headers = "From: $senderemail \r\n
 
  Reply-To: $senderemail \r\n";
 
 
 
 
 
// THE MESSAGE
 
$body = "from $name - $ip\n\n\n$message\n\n$senderemail ";
 
 
 
 
 
if(empty($senderemail)){
 
 
 
echo "<br /><br /><br /><br /><center><h3>Please go back and fill in
 
<b>your email address</h3></center></b>";}
 
 
 
else
 
 
 
if(empty($name)){
 
 
 
echo "<br /><br /><br /><br /><center><h3>Please go back and fill in
 
<b>your name</b></h3></</center>";}
 
 
 
else
 
       
 
if(empty($subject)){
 
 
 
echo "<br /><br /><br /><br /><center><h3>Please go back and type <b>a subject</b></h3></</center>";}
 
 
 
else
 
 
 
if(empty($message)){
 
 
 
echo "<br /><br /><br /><br /><center><h3>Please go back and type
 
<b>a message</b></h3></</center>";}
 
 
 
else
 
   {
 
 
 
 
 
mail($recipients, $s, $body, $headers);
 
 
 
echo"<center><br /><br /><br /><br /><br />
 
<h3>Thank you <font color=red>$name</font>
 
your message '<font color=red>$s</font>' has been sent.
 
<br />The TYF webmaster will reply to <font color=red>$senderemail</font>
 
if needed<br /><br /><br /><br />Click this <a href=javascript&#058;history.go(-2)>This Link</a> to go back to where you
 
previously
 
were.</h3><br /><br /><br /><br />
 
<font size=2 color=blue>$ip IP has been logged for
 
security reasons.</font></center>";
 
 
 
}
 
?>
 
 
 
 
 
 
 
</body>
 
</html>
  1. <html>
  2.  
  3. <head>
  4.  
  5. <title>Thanks for the Email!</title>
  6.  
  7. </head>
  8.  
  9. <body bgcolor="#ffffff">
  10.  
  11.  
  12.  
  13. <?
  14.  
  15.  
  16.  
  17. $message = trim(strip_tags( $_POST['message']));
  18.  
  19. $name = trim(strip_tags( $_POST['from']));
  20.  
  21. $senderemail = trim(strip_tags( $_POST['semail']));
  22.  
  23. $subject = trim(strip_tags( $_POST['reason']));
  24.  
  25.  
  26.  
  27. if($suject = "1")
  28.  
  29. {
  30.  
  31. $s = "Regarding Advertising on TYF";
  32.  
  33. }
  34.  
  35. if($suject = "2")
  36.  
  37. {
  38.  
  39. $s = "Regarding Directory";
  40.  
  41. }
  42.  
  43. if($suject = "3")
  44.  
  45. {
  46.  
  47. $s = "Regarding Hit Counter";
  48.  
  49. }
  50.  
  51. if($suject = "4")
  52.  
  53. {
  54.  
  55. $s = "Regarding Article Directory";
  56.  
  57. }
  58.  
  59. if($suject = "5")
  60.  
  61. {
  62.  
  63. $s = "General Enquiry";
  64.  
  65. }
  66.  
  67.  
  68.  
  69.  
  70.  
  71. $ip = $_SERVER['REMOTE_ADDR'];
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. $recipients = "you@your-domain.com"; // Your email addy
  80.  
  81.  
  82.  
  83. $headers = "From: $senderemail \r\n
  84.  
  85.   Reply-To: $senderemail \r\n";
  86.  
  87.  
  88.  
  89.  
  90.  
  91. // THE MESSAGE
  92.  
  93. $body = "from $name - $ip\n\n\n$message\n\n$senderemail ";
  94.  
  95.  
  96.  
  97.  
  98.  
  99. if(empty($senderemail)){
  100.  
  101.  
  102.  
  103. echo "<br /><br /><br /><br /><center><h3>Please go back and fill in
  104.  
  105. <b>your email address</h3></center></b>";}
  106.  
  107.  
  108.  
  109. else
  110.  
  111.  
  112.  
  113. if(empty($name)){
  114.  
  115.  
  116.  
  117. echo "<br /><br /><br /><br /><center><h3>Please go back and fill in
  118.  
  119. <b>your name</b></h3></</center>";}
  120.  
  121.  
  122.  
  123. else
  124.  
  125.        
  126.  
  127. if(empty($subject)){
  128.  
  129.  
  130.  
  131. echo "<br /><br /><br /><br /><center><h3>Please go back and type <b>a subject</b></h3></</center>";}
  132.  
  133.  
  134.  
  135. else
  136.  
  137.  
  138.  
  139. if(empty($message)){
  140.  
  141.  
  142.  
  143. echo "<br /><br /><br /><br /><center><h3>Please go back and type
  144.  
  145. <b>a message</b></h3></</center>";}
  146.  
  147.  
  148.  
  149. else
  150.  
  151.    {
  152.  
  153.  
  154.  
  155.  
  156.  
  157. mail($recipients, $s, $body, $headers);
  158.  
  159.  
  160.  
  161. echo"<center><br /><br /><br /><br /><br />
  162.  
  163. <h3>Thank you <font color=red>$name</font>
  164.  
  165. your message '<font color=red>$s</font>' has been sent.
  166.  
  167. <br />The TYF webmaster will reply to <font color=red>$senderemail</font>
  168.  
  169. if needed<br /><br /><br /><br />Click this <a href=javascript&#058;history.go(-2)>This Link</a> to go back to where you
  170.  
  171. previously
  172.  
  173. were.</h3><br /><br /><br /><br />
  174.  
  175. <font size=2 color=blue>$ip IP has been logged for
  176.  
  177. security reasons.</font></center>";
  178.  
  179.  
  180.  
  181. }
  182.  
  183. ?>
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191. </body>
  192.  
  193. </html>
5$ Directory ||| GodBeGone - Atheist Blog
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post January 23rd, 2006, 8:03 am

Post Information

  • Total Posts in this topic: 24 posts
  • Users browsing this forum: No registered users and 155 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2009. Driven by phpBB © 2001-2009 phpBB Group.