function convertDateToMysqlFormat($dateStr) { list ($month, $day, $year) =
function convertDateToMysqlFormat($dateStr) { list ($month, $day, $year) = split(”/”, $dateStr); return $year . “-” . $month . “-” . $day; } The function checkSessionAuthenticated() checks if the user session is authenticated. If the user session is not authenticated then the function sends a WML error page: function checkSessionAuthenticated() { global $isAuthenticated; Start the session: session_start(); Return true if the $isAuthenticated variable is stored in the session and its value is true. Else return an error page: if (session_is_registered(”isAuthenticated”) && $isAuthenticated) { return true; } else { sendErrorPage(”Unauthenticated Session”); exit; } } The class Function_Result encapsulates the return value of most of the functions. The member variable $errorMessage stores the error message, and the member variable $returnValue stores the return value. On failure the value of member variable $returnValue is null: class Function_Result { var $errorMessage; var $returnValue; The constructor of Function_Result sets the value of member variables $errorMessageand $returnValue: function Function_Result($errMessage, $retValue) { $this->errorMessage = $errMessage; $this->returnValue = $retValue; } } The function getDBConnection() returns the MySQL database connection: Page 556
Hint: If you are looking for high quality and reliable webspace provider to host and run your jsp hosting application check Sandzak jsp web hosting provider