Does anyone know why nothing is being inserted into the database?
>>247481
>>247482
>>247481
Just echo out $sqlQuery inside your function. See what it looks like, if you dont see anything wrong then paste the output into a mysql client like heidisql and try to run it
>>247481
Because you're doing your own data validation, and not using parameterised queries* and statement->bindValue()?
Because you're not checking any return codes whatsoever, so you don't know if you have a valid database handle, you don't know if that handle's successfully prepared a statement, and you don't know if that statement's actually executed?
* a further benefit to doing it properly is that the database only has to compile your parameterised query once, and you can use it again and again to insert different values.
>>247683
>Because you're doing your own data validation, and not using parameterised queries* and statement->bindValue()?
Just want to emphasize this. Never ever just stick variables into your query like that op, unless you have guaranteed beyond any doubt that they are by nature of a certain value (like an int) and not user input, and even then it'd be lazy and dangerous. This is just asking for a sql injection.
>>247481
Use pdo correctly (if your not using it use it), then ask again
https://phpdelusions.net/pdo
>>247481
>inserting directly using variables
Enjoy your sql injections. call bindValue() my dude