0

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

Edited by malatamil: c

Attachments r1.png 10.84 KB r.png 17.93 KB
2
Contributors
2
Replies
45
Views
3 Years
Discussion Span
Last Post by malatamil
0

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>
0

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 } ?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.