Hello,
I have the following script part:
elsif ($r_in->{'action'} eq "write_cart_to_window") {
require "$datalib/view_cart.pl";
print "\n";
if ($cart_id && -e "$cart_dir/$cart_id.cart")
{
view_cart(\%in,$cart_id,$r
_lang,$r_s
etup,1);
}
else {
Location:
http://mmcw.hypermart.net/cgi-bin/DCShop/menu.html;
}
}
What I want to do is to redirect to the url
http://mmcw.hypermart.net/cgi-bin/DCShop/menu.html when if ($cart_id && -e "$cart_dir/$cart_id.cart")
is not true.
The script contains also the line
print "Content-type: text/html\n";
which can not be removed,replaced or changed because the script will then stop workings!!
How to do that??
{
print "Content-type: text/html\n";
print "Location: http://mmcw.hypermart.net/cgi-bin/DCShop/menu.html\n";
}