I have an issue. When I run:

try {
 $as
  ->setForename($_POST['fname'])
  ->setSurname($_POST['sname'])
  ->setEmail($_POST['email'])
  ->setUser($_POST['user'])
  ->setPass($_POST['pw'])
  ->setPhone($_POST['tel'])
  ->setMobile($_POST['mob'])
  ->setJob($_POST['job'])
  ->setAuth($_POST['auth'])
  ->addProcess();
}
catch (Exception $e) {
 echo $e;
}

I get "white screen of death" however when I use:

$as
 ->setForename($_POST['fname'])
 ->setSurname($_POST['sname'])
 ->setEmail($_POST['email'])
 ->setUser($_POST['user'])
 ->setPass($_POST['pw'])
 ->setPhone($_POST['tel'])
 ->setMobile($_POST['mob'])
 ->setJob($_POST['job'])
 ->setAuth($_POST['auth'])
 ->addProcess();

It all works fine. I am really confused please help, thanks in advance.

有帮助吗?

解决方案

The try-catch block seems to be fine, try putting these lines on top of your script to see the possible error:

ini_set('display_errors', true);
error_reporting(E_ALL);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top