Results 1 to 3 of 3

Thread: CGI Variables

Threaded View

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    CGI Variables

    I'm trying to alternate between using two colors in a Perl/CGI script as follows:

    Code:
    #declaration:
    $color1 = "#1d91c9";
    $color2 = "#d4d4d4";
    $color = $color1;
    
    #code to change:
    if ($color == $color1) {
      $color = $color2;
    } else {
      $color = $color1;
    }
    I've also tried = instead of == (can't remember what each is used for). It's been awhile since I've worked with cgi. Any ideas?
    Last edited by The Hobo; Feb 22nd, 2002 at 12:09 PM.
    My evil laugh has a squeak in it.

    kristopherwilson.com

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