CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Linking within script & header problem...

 



douge
Deleted

May 23, 2000, 10:49 PM

Post #1 of 1 (732 views)
Linking within script & header problem... Can't Post

I know how to link within a script but only if I don't have a http header above the print url statement. What do I do if I need a header statement? Here's the code I'm using:
__________________________________

use CGI;
$co = new CGI;

%greetings = $co->cookie('greetings');

if ($co->param('name')) {
$greetings{'name'} = $co->param('name')
}
if ($co->param('birthday')) {
$greetings{'birthday'} = $co->param('birthday')
}

$greetingcookie = $co->cookie
(
-name=>'greetings',
-value=>\%greetings,
-expires=>'+365d'
);

if($co->param('name') | | $co->param('birthday')) {

print $co->header(-cookie=>$greetingcookie);

} else {

print $co->header;

}

$url = 'http://testsite/macomprod.html';
print "Location: $url\n\n";
_______________________________

It just prints the url. Doesn't send to the url. How can I get around this? Thanks in advance.

Doug

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives