[website-critique] Perl Script Help

  • From: "Peter" <lists@xxxxxxxxxxxxxxxxxxx>
  • To: "computertalkshop@freelists. org" <computertalkshop@xxxxxxxxxxxxx>
  • Date: Tue, 23 Apr 2002 20:42:14 -0400

I am trying to get the following to work, but to no avail.

Here is a simple script to set the cookie:


use strict;
use CGI qw(:standard);

use vars qw($query $cookie);

$query = new CGI;
$cookie =
cookie(-name=>'custom', -value=>$query->param('status'), -path=>'/', -expire

print redirect(-uri=>$ENV{'HTTP_REFERER'}, -cookie=>$cookie);


With the HTML code, I have this placed:

<a href="http://www.yoursite.com/colour.cgi?status=blue";>Make It Blue</a>
<a href="http://www.yoursite.com/colour.cgi?status=red";>Make It Red</a>
<a href="http://www.yoursite.com/colour.cgi?status=green";>Make It Green</a>

...and so on. And now, time to set up a little SSI. Using the above

<!--#if expr="$HTTP_COOKIE=/custom\=blue/" -->
<font color="#0000ff">This is blue text</font>
<!--#elif expr="$HTTP_COOKIE=/custom\=red/" -->
<font color="#ff0000">This is red text</font>
<!--#else -->
<font color="#00ff00">This is green text</font>
<!--#endif -->

Now the cookie get generated, but when I click on 'Make It Red' or 'Make It
Blue', it still outputs 'This is green text'!!

Any ideas?


Free Domain To List Members: http://szaroconsulting.com/freedomain.htm

List Info: http://www.freelists.org/cgi-bin/webpage?webpage_id=websitecritique 

Other related posts:

  • » [website-critique] Perl Script Help