Grow your CSS skills. Land your dream job.

include keywods description and title for each page different

  • # October 4, 2012 at 5:41 pm

    my question now is everything is working like my template and the content all i want is to include keywods description and title for each page different it is giving me headache i have a database name pages it has 6 columns id,name,title,description,keywords ,status. All my pages are working that are from the database what i want now is my pages changes with the name i from the database that is pages changing with the page thanks

    < ?php
    // Set document:
    include (‘config/setup.php’);
    if(!isset($_GET)) {

    $pg= ‘page';
    }else{
    $pg= $_GET;
    }

    ?>
    this is my php code

    < !DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">





    < ?php //include('content/'.$pg.'.php');
    $q=”SELECT*FROM pages WHERE name=’$pg’ “;

    $r=mysqli_query($dbc,$q);

    $page= mysqli_fetch_assoc($r);

    echo ‘

    ‘.$page.’

    ‘;
    ?>



Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".