php - SQL query INSERT not working inserting values into my DB -
this question has answer here:
i'm trying insert values db it's not working, i'm trying figure out why it's not working i'm amateur php coder,
this code i'm using:
$insert = mysql_query     ("     insert news(id,title,body,date,by)     values ('null','".$title."','".$body."','".$date."','".$by."')     ");     mysql_close($connect);   and rows i'm trying insert are: id,title,body,date,by
 it's not showing in database or on news page.
can please me?
by special keyword.  try wrapping column names in tick marks:
insert news(`id`,`title`,`body`,`date`,`by`)      
Comments
Post a Comment