in reply to Re: Interesting CSS/CGI issue...
in thread Interesting CSS/CGI issue...

Well, here's stylesheet.cgi:
#!/usr/bin/perl -w # # #error reporting modules use strict; #CGI modules use CGI qw(:standard); use CGI::Carp qw(fatalsToBrowser warningsToBrowser); #database modules use DBI; my $query = new CGI; my $id = $query->param('skin'); my $content = ''; my $sth = ''; my $dbh = DBI->connect("DBI:mysql:****","****","****") or die("Error connecting to MySQL Database: $DBI::errstr\n"); $content = $dbh->selectrow_array("SELECT content FROM skins WHERE id = + $id"); print "Content-type: text/css\n\n"; print qq ~ $content ~;

Which still doesn't work. It's printing out $content all right, and that's all working...but when I try to use that line of HTML, nothing happens.
(the content for the first skin is just .body{background-color: #00FF00;})

Replies are listed 'Best First'.
Re^3: Interesting CSS/CGI issue...
by sauoq (Abbot) on Sep 24, 2005 at 06:48 UTC

    Is your server properly configured to run CGI scripts? You might try temporarily changing your content type to text/plain and hitting the script from your browser.

    -sauoq
    "My two cents aren't worth a dime.";
    
      Turned out that it was the period before "body".