I\'m using the following script to use a database using PHP:
try{ $db = new PDO(\'mysql:host=\'.$host.\';port=\'.$port.\';dbname=\'.$db, $user, $pass, $o
Try adding the following if statement :
if ($db) { $query = $db->prepare("INSERT INTO users (...) VALUES (...);"); $query->execute(....); } else die('Connection lost');