SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Oct 2001
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    exporting data and phpcode

    Hi

    can anyone give some pointers to two questions below :

    1) is it possible to have phpcode with the title tag ? <title>$pagename</title>


    2) i am working on a news site & was wondering if its possible to extract the data from the mysql database into a text/doc/xml file using a sql query? I want to extract content from various fields within the table & then email the file out

    Thanks

  2. #2
    Mlle. Ledoyen silver trophy seanf's Avatar
    Join Date
    Jan 2001
    Location
    UK
    Posts
    7,168
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I take it you are using PHP includes. In the file that has the include have something like this:

    PHP Code:
    <?php

        $title 
    "This is the title";
        include 
    'file.ext';

    ?>
    Then in the file you are including you can do this:

    PHP Code:
    <html>
    <head>
    <title><?php echo $title?></title>
    Sean
    Harry Potter

    -- You lived inside my world so softly
    -- Protected only by the kindness of your nature

  3. #3
    SitePoint Enthusiast
    Join Date
    Oct 2001
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    i am actually using a database & the page names are stored in a db table..


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •