Email kathy if you continue to have problems.";} // event option string query $ev_query = "select id, event_title from album.album_event where user_id = '$usr_id' order by id DESC"; $event_rs = mysql_query($ev_query, $link); $event_options=""; while($row = mysql_fetch_array($event_rs)) { $event_options .= "\n"; $event_num++; } // end event option string query } elseif ($action == "update" && !empty($HTTP_POST_VARS["entryId"])) { $inDate = $HTTP_POST_VARS["entryDate"]; $inEventId = $HTTP_POST_VARS["entryEventId"]; $inTitle = $HTTP_POST_VARS["entryTitle"]; $inDiaryText = $HTTP_POST_VARS["entryText"]; $inTimestamp = date("YmdHis"); $inId = $HTTP_POST_VARS["entryId"]; $arrayFields = Array("diary_date", "event_id", "title", "diary_text", "date_created"); $arrayValues = Array("'$inDate'", "$inEventId", "'$inTitle'", "'$inDiaryText'", "$inTimestamp"); $ret = updateDb($link, "album.diary", $inId, $arrayFields, $arrayValues); if ($ret < 0) {$errMsg = "Your journal entry did not get updated correctly. Please try again.
Email kathy if you continue to have problems.";} // event option string query $ev_query = "select id, event_title from album.album_event where user_id = '$usr_id' order by id DESC"; $event_rs = mysql_query($ev_query, $link); $event_options=""; while($row = mysql_fetch_array($event_rs)) { $event_options .= "\n"; $event_num++; } // end event option string query } } elseif (isset($HTTP_GET_VARS["id"])) { $id = $HTTP_GET_VARS["id"]; $getQuery = "select d.id, d.event_id, d.title, d.diary_date, d.diary_text from album.diary d, album.album_event ae where d.id = $id and d.event_id =ae.id and ae.user_id = '$usr_id'"; $getRs = mysql_query($getQuery, $link); $getRows = mysql_fetch_array($getRs); $getId = $getRows["id"]; $getEventId = $getRows["event_id"]; $getTitle = $getRows["title"]; $getDate = $getRows["diary_date"]; $getText = $getRows["diary_text"]; // event option string query $ev_query = "select id, event_title from album.album_event where user_id = '$usr_id' order by id DESC"; $event_rs = mysql_query($ev_query, $link); $event_options=""; while($row = mysql_fetch_array($event_rs)) { $event_id = $row["id"]; $event_options .= "\n"; $event_num++; } // end event option string query } mysql_close($link); $pgeKeywords = "Add new entry to online Journal"; $pgeDesc = "Add New Entry to Journal"; $pgeTitle = "Add New Journal Entry"; $pgeContent = ""; if(isset($errMsg)) { $pgeContent .= "

ERROR: $errMsg
"; } $pgeContent .= "
Add Journal Entry
(you can edit entries by add \"?id=\" in the URL with the entry id)
Event id:
Title:
Date: (yyyy-mm-dd format)
Diary text: do not add html. just use paragraph breaks in the body of the text.
 
"; include ("$incrp/template.inc"); ?>