Error messages

To display an error message as a javascript alert, call the function addErr(). If addErr() is called more than one time in the same page messages are appended, so it's advisable to end every message with a newline (\n).

$_obweb->addErr("Error message\n");

Error messages get automatically cleaned after display, but they are still remembered even after redirecting to another page. Even after redirecting in page mypage, our error message is still shown.

  $_obweb->addErr("You did a 'bad' thing\n");
  header("Location: index.php?page=mypage");
  exit();