SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Addict joyce's Avatar
    Join Date
    Aug 2001
    Posts
    295
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    link back to same page but different function??

    can i do it in such a way that a word (which is a link) linked back to the same page but to different function?

  2. #2
    SitePoint Guru Husain's Avatar
    Join Date
    Sep 2001
    Posts
    620
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It is not clear what you are trying to do. Please give some more detail. Thanks.

  3. #3
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean something like this?

    script.php?page=news <-- this link would show the news page
    script.php?action=faqs <-- this link would display FAQs

    If so, the easiest way to do it is with PHP's switch statement:
    PHP Code:
    switch($action) {
        case 
    'news':
            
    // Code for displaying news goes here
            
    break;

        case 
    'faqs':
            
    // Code for displaying news goes here
            
    break;


  4. #4
    SitePoint Guru
    Join Date
    Aug 2001
    Location
    Amsterdam
    Posts
    788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by Skunk
    Do you mean something like this?

    script.php?page=news <-- this link would show the news page
    script.php?action=faqs <-- this link would display FAQs
    [/php]
    Would it not be easier then to use
    script.php?action=news
    script.php?action=faqs

    the neigbours (free) WIFI makes it just a little more fun


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
  •