I created a function in JavaScript that transform an 'image' file selected by user to dataURI. Then I passed it to a php script by POST method. The problem is when I try to save this information into MySQL as follows
$him = $_POST["him"];
$req = $pdo->prepare("INSERT INTO `cr`.`chercheur`
(`cin`, `nom`, `prenom`, `statut`,
`tel1`, `email`, `tof`, `etat`)
VALUES (?, ?, ?, ?, ?,?, ?, '0')");
$req->execute(array($cin,$nom,$prenom,$statu,$tel,$mail,$him));
I get an error below.
Warning: PDOStatement::execute(): MySQL server has gone away in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\projects\CR\module\compte\demande\dem_user.php on line 89
Warning: PDOStatement::execute(): Error reading result set's header in C:\Program Files (x86)\EasyPHP-DevServer-14.1VC9\data\localweb\projects\CR\module\compte\demande\dem_user.php on line 89 SQLSTATE[HY000]: General error: 2006 MySQL server has gone away