Question

Hi everybody I am reading a book and i got stuck in this

when can I process the $_POST variable to reassign many posts
like $name=$_POST[‘name’];
$email=$_POST[‘email’];
$message=$_POST[‘message’];
I know this makes them easier to handle but i want when can I use this process .
// process the $_POST variables
$name = $_POST[‘name’];
$email = $_POST[‘email’];
$comments = $_POST[‘comments’];

// limit line length to 70 characters
$message = wordwrap($message, 70);
// send it
$mailSent = mail($to, $subject, $message);
}

<?php
if ($_POST && !$mailSent) {
?>

Once a POST form has been submitted the $_POST array will have values


if(isset($_POST['name'])) {
  $name = $_POST['name'];
  //...
}

You can check all the variables with…

print_r($_POST);