No. What I meant by âwrapâ is to put the assignments, and probably the entire script (unless for some reason you want to mail() regardless), inside an if conditional. eg. in pseudo code
if ($some_condtion === true) {
// run this code
} else {
// run this code instead
}
The â$some_condition === trueâ in this case being the test for a POST array.
Testing and dealing with the various POST array members will still need to be done within the condional.
Lol man If i Just do like this I upload the file here then you maybe can change whats need to change for the php script to work. Because im a completly noob and I so bad at english
Sorry, but that is not possible. As I posted previously there are several ways to write the code, and the decisions about how to go about it are up to you.
Maybe a modified version of my previous example will be more helpful?
<?php
if ($_SERVER['REQUEST_METHOD'] == 'POST') { // new line added before your existing code
// ALL of your existing code here
} // new line added after your existing code
?>