SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: PHPuzzle

  1. #1
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's my problem: I'd like to have links running across the side of the page and they will link to all the pages in the article like this:

    1. Page 1
    2. Page 2
    3. Page 3

    (Notice how the middle link is not underlined, therefore is the page the visitor is looking at.) How do I do this? I am using both PHP and MySQL.

  2. #2
    ********* wombat firepages's Avatar
    Join Date
    Jul 2000
    Location
    Perth Australia
    Posts
    1,717
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well you set attributes like underline etc using CSS - so its not really PHP's problem , but you can use PHP to change the style of a link but you need to understand the CSS first.

    ------------------

  3. #3
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't mean that. What I want is the current page not to be a link but all the other ones to be. If you don't understand what I mean, look in this Webmonkey article then click the 'next button several times to see what I mean. I believe this has to be done in PHP, not CSS.

  4. #4
    SitePoint Member
    Join Date
    Jun 2000
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have PHP making those links for you (like in a for() loop) then you just put in a IF() loop to compare the page their on (parse out the current url or if your loading the page in index.php? just compare the variables) if the page is == to the one their on don't print <A HREF>

    Its always simple in theory

    -Matt

    ------------------
    -----
    ComicalPics.com

  5. #5
    ********* Addict
    Join Date
    Apr 2000
    Location
    Posts
    272
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I knew it would be possible like that, but I just thought there would be an easier way. Well I will just have to do it like that then. Thanks anyway.


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
  •