I'm updating my add post script but now I've a problem inserting things into mysql.
When I use this INSERT INTO code:
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$id=$_POST['id'];
$title=$_POST['title'];
$pic=$_POST['pic'];
$youtube=$_POST['youtube'];
$cat=$_POST['cat'];
$NSFW=$_POST['NSFW'];
// insert data to mysql
$sql = "INSERT INTO post(id, title, pic, youtube, cat, NSFW)VALUES('$id', '$title', '$pic', '$youtube', '$cat', '$NSFW')";
$result=mysql_query($sql);
}
I can INSERT things into my mysql, but I've added a new row which is called add
So If I add $add=$_POST['add'];
and I change $sql
$sql = "INSERT INTO post(id, add, title, pic, youtube, cat, NSFW)VALUES('$id', '$add', '$title', '$pic', '$youtube', '$cat', '$NSFW')";
This doesn't want to insert anything any more.
EDIT
Thank you guys, didn't know about the 'add' function of mysql my bad laughed my self haha:P Didn't know since I'm new to this