php - MySQL Syntax Error WITH emails -


I am trying to get a posted form variable and mySQL is throwing an error while trying to insert them . Why can not I figure for my life Hope someone can help you submit the function () {Global $ DBC; Enter the value ("$ _SERVER '[' REQUEST_METHOD '] ==' Post ') {$ query =" found1 (fname, lname, email, phone, name, color, model, size, information, location) Mysql_real_escape_string ($ _ POST ['fname']), ". Mysql_real_escape_string ($ _ POST ['lname']).", "Mysql_real_escape_string ($ _ POST ['email']).", ". Mysql_real_escape_string $ _ POST ['mysql_real_escape_string ($ _ POST [' name ']). ",". Mysql_real_escape_string ($ _ POST [' color ']). ",". Mysql_real_escape_string ($ _ POST [' make ']). " "Mysql_real_escape_string ($ _ post ['model'])." "Mysql_real_escape_string ($ _ post ['size']). Mysql_real_escape_string ($ _ post ['info'])." MySql_real_escape_string ($ _ POST ['location']). "); $ Result = Mysqli_query ($ dbc, $ query); check_results ($ result); // return $ mysqli_insert_id ($ dbc); mysqli_free_result ($ result);}}

Submitting (general information about an item. This is a mySQL error.

  MySQL error: There is an error in your SQL syntax; Check the manual that matches your MySQL server version for the correct syntax '@ gmail.com, 444-444-4444, book, # 000040, NA, NA, large, nothing special, burning house)' line 4 The syntax to use on   

In this case what I input

then yes, any help would be great. Not sure that this is just stupid something my eyes are starting to cross: p

thanks in advance

edit * Fixed strings, but still getting an error : New code: Entering (fname, lname, email, phone, name, color, model, size, info, location) values ​​('". Mysql_real_escape_string ('$ _post [' fname ']). "', '". Mysql_real_escape_string ($ _ post [' lname ']).' ',' ". Mysql_real_escape_string ($ _ post ['email']). '', '". Mysql_real_escape_string ($ _ post [' phone '] ) '', '". Mysql_real_escape_string ($ _post [' name '])."', '". Mysql_real_escape_string ($ _post [' color '])."', '". Mysql_real_escape_string ($ _post [ '', '". Mysql_real_escape_string ($ _ post [' model ']).' ',' '. Mysql_real_escape_string ($ _ POST [' size ']).' ','". Mysql_real_escape_string ( $ _ POST ['info']). '', ''. Mysql_real_escape_string ($ _ POST ['location']). "')'";

MySQL error:



Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -