Results 1 to 3 of 3

Thread: Global Variables

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2005
    Posts
    103

    Global Variables

    I want to create variables, all the pages on my website are able to read. I experimented with hanging all the variables behind the url (ex. http://myaddress.com/index.php?name=chris etc

    anyway, this is working just fine on my computer with apache2, but the server I use (the online one) the same code isn't working at all.

    i guess this function is disabled there. So is there another way to do the same thing?
    maybe something like a module in vb??

    Please Help

    FES

  2. #2
    Lively Member {yak}'s Avatar
    Join Date
    Aug 2005
    Posts
    119

    Re: Global Variables

    Hmm, I don't know why it wouldn't work on your other server, are you accessing name with $_GET['name']? Anyhow, I think Sessions will be able to help you out.

    Good luck
    {yak}

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Global Variables

    Most servers don't have register globals turned on. Therefore, you have to access the variables via the $_GET array.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

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