Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
# send the cookie
print $cgi->header( -cookie => $cookie );
# redirect the user
print $cgi->redirect( -uri => 'index.cgi?action=adm' );
Status: 302 Moved location: hindex.cgi?action=adm
print $cgi->redirect( -uri => 'index.cgi?action=adm[COLOR=red]&init=1[/color]' );
if ( exists ($q->param('init')) {
write_cookie ($cookie);
}
Paul,I'm not sure you can redirect after writing the header information.
# Set Cookie
my $cookie = new CGI::Cookie(@data);
Apache->request->headers_out->add('Set-Cookie' => $cookie);
# Redirect to new location
Apache->request->headers_out->add( Refresh => "0;URL=$redirect_url" );
<script language="JavaScript">
location.href = "/yourSpecialHappyPlace.html";
</script>
mbrooks said:If you are running mod_perl use the Apache::Cookie instead of the CGI::Cookie.