Skip to content
Advertisement

write in database (php/mySQL)

The problem is very simple (and everything, php and html is on one file(.php))

JavaScript

html part:

JavaScript

the result is die(‘formulaire incomplet’);,and nothing is written in the database, i don’t see why. Any clue is welcome! thanks by advance

Advertisement

Answer

First, use the bound parameters method for all your data.

Second set PDO to generate exceptions, then if the query does not compile or fails with some other reason you will get told.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement