php - mysqli_query INSERT not working -


i trying execute mysqli_query insert values database not working.

mysqli_query($con, "insert `temp` (`name`, `email`, `delivery`, `session`) values ('$name', '$email', '$delivery', '$session'"); 

can see going wrong? thanks!

you're missing ) @ end of query:

mysqli_query($con, "insert `temp` (`name`, `email`, `delivery`, `session`)                     values ('$name', '$email', '$delivery', '$session')");                                                                       ^ 

btw, mysqli supports parametrized queries, should use them instead of string substitution.


Comments

Popular posts from this blog

c# - OpenXML hanging while writing elements -

php - regexp cyrillic filename not matches -

sql - Select Query has unexpected multiple records (MS Access) -