- http_response_code: documentation ( source)
- filter_var: documentation ( source)
<?php
if(
empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['transid']) ||
empty($_POST['psne']) ||
empty($_POST['psnp']) ||
empty($_POST['list']) ||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)
) {
!filter_var($_POST['psne'],FILTER_VALIDATE_EMAIL);
}
{
echo "Please fill in all the boxes correctly.";
http_response_code(400);
return false;
}