Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need Help with Menu

    Code:
    <tr> <? php
       if($url == "characters.php"){
      echo "<table>";
      echo "<tr><td>";
      echo "<a href=\"characters.php\" onfocus=\"this.blur()\"> Characters</a></td>";
      echo "</tr><tr><td>";
      echo "Blah Blah Blah";
      echo "</td></tr></table>";
    } else {
      echo "<td>";
      echo "<a href=\"characters.php\" onfocus=\"this.blur()\"> Characters</a></td>";
    }
    ?>
    </tr>
    that's the section i need help with. I get errors for the if($url == "characters.php"){ line. Help me please?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,471
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    All I can think of is trying this:

    if($url === "characters.php"){

    What does the error message say?

  • #3
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,027
    Thanks
    2
    Thanked 315 Times in 307 Posts
    I'm with mlseim. Posting actual errors is always helpful and the quickest way to get a solution.

    However, your <? php tag is improperly formed. Remove the space between the <? and the php.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,471
    Thanks
    8
    Thanked 1,085 Times in 1,076 Posts
    doh! I missed that one ... good catch CFADMIN!

  • #5
    New to the CF scene
    Join Date
    Nov 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    the error was with the space between the <? and php

    thanks for helping though!


  •  

    Posting Permissions

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