php - Error when putting Session variable in insert into query -
this question has answer here: syntax error due using reserved word table or column name in mysql 1 answer i'm getting error: error: insert order (username, productname, qty) values ('denieall.joe', 'wrist watch', '1') have error in sql syntax; check manual corresponds mysql server version right syntax use near 'order (username, productname, qty) values ('denieall.joe', 'wrist watch', '1' @ line 1 <?php session_start(); include("includes/constants.php"); include("includes/functions.php"); if (!isset($_session['username'])) { redirect_to_home(); } //conection , select database: $conn = mysqli_connect(db_server,db_user,db_pass,db_name) or die("error !!!" ); foreach ($_session["cart_products"] $cart_itm) { $...