I have a Simple CMS i made but i cant anderstand how to connect the content to the category
i need another mysql table for cat?
how can i add this in to the form?
which functions will show the cat in the Add content page?
// Get values from form
// Insert data into mysql
$sql="INSERT INTO $content (titel, discription, content )VALUES('$title', '$discription', '$content')";
// if successfully insert data into database, displays message "Successful".
echo "<a href='addp.php'>Back to main page</a>";
As tintin shows, you need to include the connection ($dbc). I'm assuming this is set in your config.php file. Of course it may be called something other than $dbc. Just change the name of the variable in that case.
I'm really sorry mat - my mistake, the parameter order in Tinnin's post is wrong - yours should be:
$result = mysqli_query($con, $query);
Anyway, you can check this out yourself at http://php.net/manual/en/mysqli.query.php and look at the 'Procedural Style' not the 'OOP Style'. However, I would suggest maybe moving towards OOP if your site needs it.