Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_cache_limiter();
- session_start();
- error_reporting(E_ALL);
- ini_set('display_errors',1);
- require('config.php');
- require('functions.php');
- //check for administrative rights
- if (allow_access('Administrators') != "yes")
- {
- include ('no_access.html');
- exit;
- }
- $id_memos = $_POST['id_memos'];
- $memo_date = date('Y-m-d');
- $memo = $_POST['memo'];
- $memo = mysql_real_escape_string($memo);
- $memos_active = isset($_POST['memos_active']) && $_POST['memos_active'] == 1 ? 1:'0';
- // update data in mysql database
- $sql="UPDATE `memos` SET memo_date='$memo_date', memo='$memo', memos_active='$memos_active' WHERE id_memos='$id_memos'";
- $result=mysql_query($sql);
- // if successfully updated.
- if($result){
- echo "Record Updated Successfully!";
- echo "<BR>";
- }
- else {
- echo "ERROR";
- }
- ?>
- <html>
- <head>
- <meta http-equiv="refresh" content="3; url=main_menu.php" />
- </head>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement