Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: isset/unset

  1. #11
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    PHP Code:
      echo $arr["key"]; //echos nothing, because it doesnt exist. 
    Also throws a warning.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  2. #12
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks , i understand the non-existing part but don't understand that thing about warning part...

  3. #13
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    And one more thing , how do you record a persons ip address (PHP)

  4. #14
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    i understand the non-existing part but don't understand that thing about warning part...
    There are three levels of message in PHP: error, warning, and informational. By default, PHP only displays error messages, which indicate when something's gone wrong and the script is unable to continue. However, it can also display warning messages, which highlight bad coding practices (such as accessing non-existent variables or array elements) and other potential problems, and informational messages, which just give a information about what something is doing. To show them all (and I recommend doing this when debugging a script), call:
    Code:
    error_reporting(E_ALL);
    how do you record a persons ip address
    The IP address of the client (note that this may also be a proxy) is stored in $_SERVER['HTTP_REMOTE_ADDR'].
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #15
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks for your posts guys , just one question to twey - HOW DO YOU KNOW EVRYTHING ?!!

  6. #16
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I don't... you evidently weren't here to see mwinter in action
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #17
    Join Date
    Jun 2006
    Location
    Acton Ontario Canada.
    Posts
    677
    Thanks
    0
    Thanked 1 Time in 1 Post

    Default

    Speaking of mwinter... were has he gone?

    he hasnt posted scince the holidays...
    - Ryan "Boxxertrumps" Trumpa
    Come back once it validates: HTML, CSS, JS.

  8. #18
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    So are you lot saying that mwinter was the best ?

  9. #19
    Join Date
    Feb 2007
    Posts
    601
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    One more question - is there a "dictionary" for php that lists all those functions ? eg HTTP_REMOTE_ADDR,....

  10. #20
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Speaking of mwinter... were has he gone?
    We're not sure... djr33 emailed him, but there was no response.
    is there a "dictionary" for php that lists all those functions ? eg HTTP_REMOTE_ADDR,....
    They're not functions, but yes: http://www.php.net/manual/en/reserve...riables.server.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •