Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Senior Member GeZe's Avatar
    Join Date
    Dec 2003
    Posts
    330
    Member #
    4381
    I have a simple 10 page portfolio site ( www.codebluestudios.com) so I implamented the simplist PHP ever. All I did was add a header and footer file, but I'm having problems with the title and nav things.

    At the top of the home page (for title)
    PHP Code:
    <?php

    //define everything
    define ('TITLE''codeblue studios - intelexual web design');
    $category home;

    include (
    'http://www.codebluestudios.com/header.php');


    ?>
    The header file:
    <title>
    PHP Code:
    <?php 
        
    if (defined ('TITLE')) {
            print 
    TITLE;
        }
        else {
            print (
    'codeblue studios - intelexual web design');    
        }
    ?>
    </title>

    It doesn't work! It always prints the ELSE title no matter what!

    Then the category thing doesn't work...
    Footer file:
    PHP Code:
    <li id="side_nav_home"><a <?php if($category == home){print('id=\"side_nav_select\"');}?> accesskey="h" tabindex="1" title="home" href="http://www.codebluestudios.com/home.php"><span class="noshow"><kbd>h</kbd>ome</span></a></li>
    -GeZe

  2.  

  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Well, for one...

    $category = home;

    should be

    $category = 'home';

    test against the string as well. You're defining it to some constant... which, I'm not sure will work.

    Did you happen to notice that your constant TITLE and your else statement are the exact same string? You're going to get the same results no matter what.

    P.S. It's intellectual
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  4. #3
    Senior Member GeZe's Avatar
    Join Date
    Dec 2003
    Posts
    330
    Member #
    4381
    Thanks!
    I'll see if it works.

    Oh, and intelexual is spelt that way on purpose. Its subliminal advertising, as its supposd to remind you of the word "sexual"
    -GeZe


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 10:53 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com