1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

php site page not showing

Discussion in 'PHP' started by tptnyc, Aug 22, 2008.

  1. #1
    WHY THIS not opening up??


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/XHTML1/DTD/XHTML1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>Lovely Toys</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <style type="toy/css">
    p { padding:8px }

    #logo {
    height:75px;
    font-size:24px;
    margin-bottom:15px }

    #left, #right { clear:both }
    #left { width:15%;float:left }
    #right { width:82%;float:right }

    #logo, #left, #right {
    background:#eee;
    border:1px solid #aaa }

    #left ul, li { margin:8px;list-style-type:none }
    body { font: normal 12px verdana, tahoma, sans-serif }
    </style>
    </head>
    <body>
    <div id="logo">
    <p>BABYTOYS.COM</p>
    </div>

    <div id="left">
    <ul>
    <li><a href="./index.php">Home</a></li>
    <li><a href="./woodentoys.php">Wooden Toys</a></li>
    <li><a href="./handmadetoys.php">Hand Made Toys</a></li>
    <li><a href="./toddlertoys.php">Toddler Toys</a></li>
    <li><a href="./kidstoys.php">Kids Toys</a></li>
    <li><a href="./softtoys.php">Soft Toys</a></li>
    <li><a href="./indoor.php">Indoor Toys</a></li>
    <li><a href="./outdoor.php">Outdoor Toys</a></li>
    </ul>
    </div>

    <div id="right">
    <!-- break for content -->

    footer.php

    <!-- end of content -->
    </div>
    </body>
    </html>

    index.php

    <?php include 'main.php' ?>
    <p>Homepage - Welcome to our quality store for amazingly beautiful safe toys for the kids of all age type at prices you won't find in any store..</p>
    <?php include 'footer.php' ?>

    pageone.php

    <?php include 'main.php' ?>
    <p>pageone - Our store is well known for its quality and affordable prices..</p>
    <?php include 'footer.php' ?>

    pagetwo.php

    <?php include 'main.php' ?>
    <p>pagetwo -Cheap toys can be toxic and can harm your children health. Buy quality and buy safe toys..</p>
    <?php include 'footer.php' ?>

    pagethree.php

    <?php include 'main.php' ?>
    <p>pagethree -We have wide variety of kids toys to suit your various needs..</p>
    <?php include 'footer.php' ?>
     
    tptnyc, Aug 22, 2008 IP
  2. IGiveMoney

    IGiveMoney Peon

    Messages:
    116
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <?php include 'footer.php' ?>

    needs to be

    include('footer.php');
     
    IGiveMoney, Aug 22, 2008 IP
  3. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If I need to create separate include file for the footer, what should I write at top and at the bottom of footer page? (coding help)
     
    tptnyc, Aug 22, 2008 IP
  4. lfhost

    lfhost Peon

    Messages:
    232
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    each of your includes needs to be closed with a ; before the ?>
    check your error log.
     
    lfhost, Aug 22, 2008 IP
  5. HypertextFever

    HypertextFever Peon

    Messages:
    158
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Also, just throwing this out there...

    
    <style type="toy/css">
    
    Code (markup):
    If that's legit, I've never seen it before. Should be text/css.



    Also, for your footer file, assuming it's footer.php, could look something like this:

    
    <?php
    // Footer
    ?>
    <div id="footer">
    <p>&copy; <?php echo $sitename; ?> , etc. etc. whatever in the footer</p>
    </div>
    
    </body>
    </html>
    
    <?php
    // Other PHP code if you need it, etc.
    ?>
    
    Code (markup):
     
    HypertextFever, Aug 22, 2008 IP
  6. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I guess you'r right. Any other suggestions in codings that may help or improve?
     
    tptnyc, Aug 22, 2008 IP
  7. NatalicWolf

    NatalicWolf Peon

    Messages:
    262
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #7
    To the one poster, include isnt a function, its an internal php call.. include 'test'; is perfectly a legal statement. just make sure you file names are correct and try moving stuff into folders if you can?
     
    NatalicWolf, Aug 22, 2008 IP
  8. nirajkum

    nirajkum Active Member

    Messages:
    815
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    58
    #8
    Please check the error message first.
     
    nirajkum, Aug 23, 2008 IP
  9. tptnyc

    tptnyc Peon

    Messages:
    764
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Thanks HypertextFever, you'r great and it is very helpful.
     
    tptnyc, Aug 24, 2008 IP