malatamil 9 Junior Poster

dynamic title,meta keywords and description..
manually i created one page in that i add some title,keywords and descriptions based on category(i.e like home,about us,contact us etc)in backend, and i have some pages like home.php,aboutus.php etc in front end. so if i click home(home.php) that title should display which i entered for category home same like i have to display in every page based on category. how to do


    $catagory = $_POST['catagory'];
    $title = trim(ucwords(strtolower(mysql_real_escape_string($_POST['title']))));
    $description = mysql_real_escape_string($_POST['description']);
    $keywords = mysql_real_escape_string($_POST['keywords']);
    $sql = mysql_query("INSERT INTO `seo_title`(Catagory,`title`,`description`,`keywords`) VALUES ('$catagory','$title','$description','$keywords')");
        echo '<script>alert("Inserted Successfully");

my input form look like:

<form name="fname" method="post">
<select name="catagory" id="catagory">
            <option value='' selected="selected">... Select ...</option>
                $query = "SELECT `id`, `titles` FROM `seo_footer_title`  ";
                $result = mysql_query($query);
        //echo mysql_error();
    while($rows = mysql_fetch_array($result))
    $selected = "";
    $categoryId = $rows['id'];
    $categoryName = $rows['titles'];
    if($catid == $categoryId)
    $selected = "selected";
            <option value="<?php echo $categoryId; ?>" <?php echo $selected; ?> ><?php echo $categoryName; ?></option>
            <?php }  ?>
Title: <input type="text" name="title">
Description: <textarea name="description" cols="20" rows="10">
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.