I'm not a professional coder. I'm just trying to make my own website. I did the following steps below, but it didn't work.
1- I created categories for the blog at localhost database.
http://i.hizliresim.com/3jqE3M.jpg
2- I created database.php as below.
<?php
mysql_connect("localhost","root","");
mysql_select_db("mycms");
?>
3- I added the following codes to home.html
<?php
include("includes/database.php");
$get_cats = "select * from `categories`";
$run_categories = mysql_query($get_cats);
while ($cats_row=mysql_fetch_array($run_cats)) {
$cat_id=$cats_row['cat_id'];
$cat_title=$cats_row['cat_title'];
echo "<li><a href='home.html?cat=$cat_id'>$cat_title</a></li>";
}
?>
BUT I can't see categories from http://localhost/MyCMS/home.html
It didn't work. What is the problem ? How can I solve this problem. Please help me :(