Sunday, 19 June 2016

php - SQL query INSERT not working inserting values into my DB

I'm trying to insert some values into my DB but it's not working, i'm trying to figure out why it's not working but I'm an amateur php coder,



This is the code I'm using:



$insert = mysql_query
("
INSERT INTO news(id,title,body,date,by)
VALUES ('NULL','".$title."','".$body."','".$date."','".$by."')
");
mysql_close($connect);



And the rows i'm trying to insert into are: id,title,body,date,by
but it's not showing up in the database or on my news page.



Can someone please help me?

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...