i have 2 tables seo_footer_title and seo_title. i want to add title,description and keywords
footer.php

<li><a href="index.php?city=<? echo $city;?>">Home</a></li>
              <li><a href="about_us1.php?page=2" title="About Us" onclick="function changetab();">About Us</a></li> 
              <li><a href="contact_us1.php?page=3" title="Contact Us">Contact Us</a></li> 

header.php

  $page = $_GET['page'];
$sql1 = mysql_query("SELECT st.`id`,st.Catagory, st.`title`, st.`description`, st.`keywords`,sft.id,sft.titles FROM `seo_title` st JOIN seo_footer_title sft ON sft.id=st.Catagory WHERE st.Catagory='$page'");
$result = mysql_fetch_array($sql1);
if($result)
{
    $title1 = $result['title'];
    $descript = $result['description'];
    $key = $result['keywords'];




?>
<?php   //}
//}
?> 
<title><?php echo $title1; ?></title>
<meta id="mtlink" name="url" content="">
<meta id="mtdesc" name="description" content="<?php echo $descript ?>" />
<meta id="mtkwrds" name="keywords" content="<?php echo $key; ?>" />
<?php } ?>

if i click that link i want to display the particular title,....
but here am getting that page url link instead of title.how to do.someone help me please

Your code is a little bit unclear to me. Essential HTML DOM elements are missing but they might well be in a different file. What about

  • <html ..>
  • <head>
  • <body>

here is my header page
header.php

    <?
    session_start();

    $page = $_GET['page'];
    ?>
    <!DOCTYPE HTML>
    <html> <!-- The Wellness Directory-->
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <?php 



    //footer
    $abtid = $_SESSION['abtid'];

    $sql1 = mysql_query("SELECT st.`id`,st.Catagory, st.`title`, st.`description`, st.`keywords`,sft.id,sft.titles FROM `seo_title` st JOIN seo_footer_title sft ON sft.id=st.Catagory WHERE st.Catagory='$page'");
    $result = mysql_fetch_array($sql1);
    if($result)
    {
        $title1 = $result['title'];
        $descript = $result['description'];
        $key = $result['keywords'];




    ?>
    <?php   //}
    //}
    ?> 
    <title><?php echo $title1; ?></title>
    <meta id="mtlink" name="url" content="">
    <meta id="mtdesc" name="description" content="<?php echo $descript ?>" />
    <meta id="mtkwrds" name="keywords" content="<?php echo $key; ?>" />
    <?php } ?>
Be a part of the DaniWeb community

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