cgi problem with "gt" and "lt"

Discussion in 'Perl Misc' started by Nick Wedd, Jan 14, 2007.

  1. Nick Wedd

    Nick Wedd Guest

    Here is the piece of my code that causes a problem:

    foreach $cc ( param() ) {
    $col = param($cc);

    and here is a piece of my cgi argument list:

    gl=6&gt=6&hn=6&mx=6&ni=8

    It all works except for when $cc (the key) is "gt" or "lt". I can guess
    what is going on, but I have no idea what I should do about it. Can
    someone please advise?

    Nick
    --
    Nick Wedd
     
    Nick Wedd, Jan 14, 2007
    #1
    1. Advertising

  2. Nick Wedd

    Paul Lalli Guest

    Nick Wedd wrote:
    > Here is the piece of my code that causes a problem:


    *What* problem?

    > foreach $cc ( param() ) {
    > $col = param($cc);
    >
    > and here is a piece of my cgi argument list:
    >
    > gl=6&gt=6&hn=6&mx=6&ni=8
    >
    > It all works


    "works" *how*?

    > except for when $cc (the key) is "gt" or "lt". I can guess
    > what is going on, but I have no idea what I should do about it.


    Should do about *what*?

    > Can someone please advise?


    Advise about *what*?!

    No where in this post have you told us either what you're *trying* to
    do, nor how what you're actually doing is failing! How is anyone
    supposed to help you fix your problem, when you haven't told anyone
    what the problem is nor even what the goal is?!

    Please read the Posting Guidelines for this group. Seriously. Right
    now. They are posted here twice a week. A simple search will reveal
    them. Please do not reply until you read them.

    Paul Lalli
     
    Paul Lalli, Jan 14, 2007
    #2
    1. Advertising

  3. Nick Wedd <> wrote:

    > Here is the piece of my code that causes a problem:
    >
    > foreach $cc ( param() ) {
    > $col = param($cc);



    What problem does it cause you?


    > and here is a piece of my cgi argument list:
    >
    > gl=6&gt=6&hn=6&mx=6&ni=8
    >
    > It all works



    What does "works" mean when you say it?

    That is, what did you intend it to do?


    > except for when $cc (the key) is "gt" or "lt". I can guess
    > what is going on, but I have no idea what I should do about it. Can
    > someone please advise?



    I advise that you tell us what you wanted it to do, and what it
    is doing that is different from what you wanted it to do.

    WAG:
    I sure hope you don't have an "eval EXPR" in your code that you
    haven't shown us...


    --
    Tad McClellan SGML consulting
    Perl programming
    Fort Worth, Texas
     
    Tad McClellan, Jan 15, 2007
    #3
  4. Nick Wedd

    Joe Smith Guest

    Nick Wedd wrote:
    > Here is the piece of my code that causes a problem:
    >
    > foreach $cc ( param() ) {
    > $col = param($cc);
    >
    > and here is a piece of my cgi argument list:
    >
    > gl=6&gt=6&hn=6&mx=6&ni=8
    >
    > It all works except for when $cc (the key) is "gt" or "lt".


    Try using ";" instead of "&" in the CGI argument list.

    gl=6;gt=6;hn=6;mx=6;ni=8

    http://www.w3.org/TR/html401/appendix/notes.html#ampersands-in-uris
     
    Joe Smith, Jan 15, 2007
    #4
  5. Nick Wedd

    Nick Wedd Guest

    In message <>, Joe Smith
    <> writes
    >Nick Wedd wrote:
    >> Here is the piece of my code that causes a problem:
    >> foreach $cc ( param() ) {
    >> $col = param($cc);
    >> and here is a piece of my cgi argument list:
    >> gl=6&gt=6&hn=6&mx=6&ni=8
    >> It all works except for when $cc (the key) is "gt" or "lt".

    >
    >Try using ";" instead of "&" in the CGI argument list.
    >
    > gl=6;gt=6;hn=6;mx=6;ni=8
    >
    >http://www.w3.org/TR/html401/appendix/notes.html#ampersands-in-uris


    Many thanks - yes - this was my problem.

    Nick
    --
    Nick Wedd
     
    Nick Wedd, Jan 15, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jürgen Exner

    Re: CGI Perl "use CGI" statement fail

    Jürgen Exner, Jul 31, 2003, in forum: Perl
    Replies:
    0
    Views:
    1,613
    Jürgen Exner
    Jul 31, 2003
  2. Shailan
    Replies:
    2
    Views:
    1,154
    Shailan
    Dec 15, 2003
  3. Luigi Ma
    Replies:
    0
    Views:
    171
    Luigi Ma
    Nov 21, 2007
  4. zippy

    cgi and cgi-bin

    zippy, Feb 1, 2005, in forum: Perl Misc
    Replies:
    5
    Views:
    467
    Sam Holden
    Feb 2, 2005
  5. BestFriend
    Replies:
    2
    Views:
    916
Loading...

Share This Page