SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Hybrid View

  1. #1
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $_GET['name.x'] ???

    i have some buttons like this:

    <INPUT TYPE="image" name="update" value="update" SRC="images/update_button.gif" width="92" height="25" BORDER="0" ALT="Update">

    when they are passed firefox displays "update=update&update.x=22"
    but ie only shows "update.x=22"

    so in order to know which button was pressed i need to look for the variable update.x or empty.x or checkout.x

    but thenever i try
    PHP Code:
    if($_GET['empty.x']){

    it is not seeing the variable empty.x even tho i can look right in the broswer url and see that it is there....so i am thinking there must be a different way to capture that variable...does anyone know how?

    THANKS.
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  2. #2
    SitePoint Addict
    Join Date
    Jan 2006
    Posts
    268
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I remember having a problem with this a few years ago, can't quite remember what I did.

    try doing

    PHP Code:
    print_r($_GET); 
    to see what exactly is being passed (and picked up) in both IE and FF.
    If you give someone a program,
    you will frustrate them for a day;
    if you teach them how to program,
    you will frustrate them for a lifetime.

  3. #3
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by pjleonhardt View Post
    I remember having a problem with this a few years ago, can't quite remember what I did.

    try doing

    PHP Code:
    print_r($_GET); 
    to see what exactly is being passed (and picked up) in both IE and FF.
    thank you so much....why didnt i think of that??? lol
    anyways in both FF and IE it was getting passed as name_x ie: empty_x so I can just check to see which of those is passed....i believe that solves my problem.

    thanks alot!
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.

  4. #4
    SitePoint Evangelist hexburner's Avatar
    Join Date
    Jan 2007
    Location
    Belgium
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You shouldn't use decimal points in variable names in the URL, only letters, underscores and digits. Variable names are pretty sensitive, so don't take the risk.
    FOR SALE: 1 set of morals, never used, will sell cheap

  5. #5
    Pragmatic Programmer halfasleeps's Avatar
    Join Date
    Feb 2006
    Location
    Altoona, PA. USA
    Posts
    1,945
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hexburner View Post
    You shouldn't use decimal points in variable names in the URL, only letters, underscores and digits. Variable names are pretty sensitive, so don't take the risk.
    hex, that variable name is not set by me it is autogenerated form the <input type="image"
    Altoona Design
    Freelance Flex developer for hire.
    ActionScript Programmer with 8 Years Experience.


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
  •