- $link = $db->getOne($query);
- if(PEAR::isError($link))
- header('location: '.$redirect);
+ $link = $DB->getOne($query);
+ if(PEAR::isError($link)) {
+
+ if (@$_REQUEST['embperl']) {
+ header('Location: /Php2Embperl_Session?redirect='.$redirect);
+ }
+ else {
+ header('Location: '.$redirect);
+ }
+ }