php - Very simple MySQL query not working -


i'm trying execute this:

$result = mysql_query("insert timesheet (project_no,user,cust_name,notes,duration) values("'".$_post['project']."', '".$_post['user']."', '".$_post['cust']."', '".$_post['notes']."', '".$_post['duration']."'")") or die(mysql_error()); 

i'm aware of sql injection. can spot issues apostrophes, speech marks etc??

the apostrophes not correct.

$result = mysql_query("insert timesheet (project_no,user,cust_name,notes,duration) values('".$_post['project']."', '".$_post['user']."', '".$_post['cust']."', '".$_post['notes']."', '".$_post['duration']."')") or die(mysql_error()); 

the mistake in beginning in "values" , on closing bracket inside query string. use editor syntax highlighting, would've showed problem.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -