Getting text inside text boxes and emailing them - PHP?

Snarky Theman

New member
Here is my code. What is wrong?
When I get the email it says one textbox's content. Can I do all of them?

<?php
$text1 = $_POST['name'];
$text2 = $_POST['tb2'];
$text3 = $_POST['tb3'];

$to = "[email protected]";

$subject = "Go!";

$body = $text1+$text2+$text3;

if (mail($to, $subject, $body)) {
echo("<p>Sent!</p>");
} else {
echo("<p>Try again... Failure!</p>");
}
?>
 
Back
Top