Thank you Eduard, that is one name I couldn't pronounce rightly. Base on your advise i check back to phplib code and found that the problems actually ly here,
$redirect=$sess->purl("can_info.php3");
header("location:$redirect");
now p stand for print, that means output, so instead of purl i should use url
$redirect=$sess->url("can_info.php3");
header("location:$redirect");
well this work and just for the record i wrote it down here.
And is there any good and pratical resources where i could quickly learn javascript? Just enough to do this
history.go(0)
history.go(-1) trick.