printf(”n”); } Most of the mobile devices do
printf(”n”); } Most of the mobile devices do not support cookies, so we will have to use the session information in the URL itself. The function getSessionIdString() returns the session id string that will have to be appended to all the anchor elements generated by the PHP script: // Get the sessionId string function getSessionIdString() { return session_name().”=”.session_id(); } The function generateOptionElement() generates WML option element: // Generate option element function generateOptionElement($href, $displayText) { printf(”n”); } The function getDateString() returns the current date in the format YYYY-MM-DD, where YYYY corresponds to the year, MM to the month, and DD to the day component of the date. This function is used when inserting date columns into MySQL tables: // Returns Date function getDateString() { return date(Y-m-d); } The function convertDateFromMysqlFormat() coverts the date from YYYY-MM-DD format to MM/DD/YYYYformat. The argument $dateStr contains date in YYYY-MM-DD format: function convertDateFromMysqlFormat($dateStr) { list ($year, $month, $day) = split(”-”, $dateStr); return $month . “/” . $day . “/” . $year; } The function convertDateToMysqlFormat() converts the date from MM/DD/YYYY format to YYYY MM-DDformat: Page 555
Note: If you are looking for cheapest and affordable webspace to host and run your servlet application check Astra j2ee hosting services