Results 1 to 6 of 6

Thread: [RESOLVED] noob question

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    3

    Resolved [RESOLVED] noob question

    i am quite new to php and was wondering, how it is possible to enter information in the toolbar. Like index.php?type=1 ....

    Could someone provide me with a little example? I would be very grateful

    Thanks in advance
    Last edited by andrea.s; Sep 19th, 2005 at 03:20 PM.

  2. #2
    Admodistrator |2eM!x's Avatar
    Join Date
    Jan 2005
    Posts
    3,900

    Re: noob question

    Do you want to be able to grab the info from the site? If so, heres what you do..

    lets say this is what you want:
    www.mysite.com/mylink.php?user=1583

    In your php script you type
    echo $_GET['user']

    hope that helps

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    3

    Re: noob question

    i actually wanted to be able to set a variable when opening my php page. For example
    when i clicked on the new thread you made this was shown in the taskbar:
    showthread.php?p=2172511#post2172511

    This tells the script what to show the user. How can i do that on my script?

  4. #4
    Hyperactive Member ninjanutz's Avatar
    Join Date
    Jun 2005
    Location
    Bayside
    Posts
    256

    Re: noob question

    hidden value fields using the method get?!?!?! i think...

  5. #5
    Hyperactive Member PlaGuE's Avatar
    Join Date
    Jun 2005
    Location
    in ur mind.
    Posts
    445

    Re: noob question

    Quote Originally Posted by |2eM!x
    Do you want to be able to grab the info from the site? If so, heres what you do..

    lets say this is what you want:
    www.mysite.com/mylink.php?user=1583

    In your php script you type
    echo $_GET['user']

    hope that helps

    well theres,

    PHP Code:
    <?
    switch(@$_GET['page']):
    case 'downloads':
    echo"Downloads";
    break; case 'home':
    echo"homepage";
    break; default:
    echo"home/default";
    break;
    endswitch;
    ?>
    OR

    PHP Code:
    $id $_GET["page"];
    if ((
    $id == "Home") or ($id == "")) 
    {
    echo
    "home/default";
    }
    if ((
    $id == "downloads")) 
    {
    echo
    "downloads";

    Last edited by PlaGuE; Sep 19th, 2005 at 01:30 AM.
    Without balance, there could only be chaos.
    Without chaos, there could be no balance.
    I live with karma. Eat with destiny. Dream of life without shackles....
    Yet. If life had no consequences, life could not exist, nor could it flourish.


    If at first you dont succeed.You're screwed.

    C++/Java NOOB.

    I aint a professional at PHP, but if i can help i will.

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2005
    Posts
    3

    Re: noob question

    thanks for all your help

Posting Permissions

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



Click Here to Expand Forum to Full Width