Update index.php

echo $error -> var_dump($error)
More usefull