bazz
08-18-2003, 02:56 PM
HI,
I am basically using a script that works very well. I have changed the output part and where fields are included in the script, I have removed them where they are not required in the output.
I can find nothing wrong yet the only part of the script which outputs is the CSS (I can see the background) and the hard coded text. The $dpt_name,dpt_html,$dpt_name all don't display :( Also if I click on the URL I get the "forbidden" page.
I think that is a different problem from the main one.
Here's the full script:
#!/usr/local/bin/perl -w
use CGI qw(:standard :form);
use strict;
#### CONFIG #####
# Department INFO
my %dpt_info = (
# Department ID => | HTML FILE | DEPT NAME | DEPT INTRO |
'aghillislandhotel_dpt' => join("\t",'http://www.mydomain.com/cgi-bin/accommodation.pl?dpt=Dept-ID_dpt','Name Of Dept','Hello. Is anybody out there?'),
);
#### END CONFIG ####
my $query = new CGI;
my $script_url = $ENV{'SCRIPT_NAME'};
my $department = $query->param('dpt');
my $action = $query->param('action');
my ($dpt_html,$dpt_name,$dpt_intro,) = split(/\t/,$dpt_info{$department});
print "Content-Type: text/html\n\n";
if($action eq 'result') { &result; }
else { &form; }
sub form {
print qq(
<HTML>
<HEAD>
<title>$dpt_name</title><link rel="stylesheet" href="http://www.mydomain.com/style_text.css">
</head>
<body>
<p class="standard"><br />$dpt_intro<br /><br /><br />
If this is your entry page to our directory (perhaps from a search engine), please <a class="standardlink" href="$dpt_html">click here </a> to see our full series of pages about $dpt_name</a>
</BODY></HTML>
);
}
Can you help?
Bazz
I am basically using a script that works very well. I have changed the output part and where fields are included in the script, I have removed them where they are not required in the output.
I can find nothing wrong yet the only part of the script which outputs is the CSS (I can see the background) and the hard coded text. The $dpt_name,dpt_html,$dpt_name all don't display :( Also if I click on the URL I get the "forbidden" page.
I think that is a different problem from the main one.
Here's the full script:
#!/usr/local/bin/perl -w
use CGI qw(:standard :form);
use strict;
#### CONFIG #####
# Department INFO
my %dpt_info = (
# Department ID => | HTML FILE | DEPT NAME | DEPT INTRO |
'aghillislandhotel_dpt' => join("\t",'http://www.mydomain.com/cgi-bin/accommodation.pl?dpt=Dept-ID_dpt','Name Of Dept','Hello. Is anybody out there?'),
);
#### END CONFIG ####
my $query = new CGI;
my $script_url = $ENV{'SCRIPT_NAME'};
my $department = $query->param('dpt');
my $action = $query->param('action');
my ($dpt_html,$dpt_name,$dpt_intro,) = split(/\t/,$dpt_info{$department});
print "Content-Type: text/html\n\n";
if($action eq 'result') { &result; }
else { &form; }
sub form {
print qq(
<HTML>
<HEAD>
<title>$dpt_name</title><link rel="stylesheet" href="http://www.mydomain.com/style_text.css">
</head>
<body>
<p class="standard"><br />$dpt_intro<br /><br /><br />
If this is your entry page to our directory (perhaps from a search engine), please <a class="standardlink" href="$dpt_html">click here </a> to see our full series of pages about $dpt_name</a>
</BODY></HTML>
);
}
Can you help?
Bazz