SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to check whether variable exists in URL

    I am passing multiple variables in the URL and want to check if a variable exists or not.

    Is there a standard function to check whether a variable is define or not.

    I have tried several examples but keep getting undefine variable error messages.

  2. #2
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried this ?
    PHP Code:
    if (empty($HTTP_GET_VAR["name_of_var"])) {
       
    // name_of_var is empty or not defined


  3. #3
    SitePoint Member
    Join Date
    Feb 2002
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Shin

    I will give it a try


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
  •