Current Path : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/CP/ |
Windows NT SG2NWVPWEB022 10.0 build 17763 (Windows Server 2016) i586 |
Current File : G:/PleskVhosts/mpcdp.in/cmamp.mpcdp.in/CP/CPMasterWhatsNew-Exec.php |
<?php if (isset($_POST['BtnAdd'])) { //Blank } else if (isset($_POST['BtnModify'])) { header("location: CPMasterWhatsNew.php?mMode=Modify"); } else if (isset($_POST['BtnSave'])) { require_once('CPConfig.php'); if (isset($_GET['mMode'])) { $mMode = $_GET['mMode']; } else { $mMode = ''; } $link = mysql_connect($hostname, $username, $password) ; $db= mysql_select_db($dbname); $WhatsNewName = addslashes(str_replace("'", "'", $_POST['TxtWhatsNewName'])); $WhatsNewRemarks = addslashes(str_replace("'", "'", $_POST['TxtWhatsNewRemarks'])); if ($WhatsNewName == '') { session_start(); $_SESSION['mWhatsNewName'] = str_replace("'", "'", $_POST['TxtName']); $_SESSION['mWhatsNewRemarks'] = str_replace("'", "'", $_POST['TxtRemarks']); header("location: CPContactUS.php?mMode=$mMode&mError=Invalid Name..."); exit; } if ($mMode == 'Modify') { $qry = "UPDATE masterwhatsnew SET WhatsNewName='$WhatsNewName', WhatsNewRemarks='$WhatsNewRemarks' WHERE WhatsNewID=1"; } $result = @mysql_query($qry); if($result) { header("location: CPMasterWhatsNew.php?mMode=Save"); } else { die("Query failed"); } } else if (isset($_POST['BtnCancel'])) { header("location: CPMasterWhatsNew.php?mMode=Cancel"); } else if (isset($_POST['BtnDelete'])) { //Blank } ?>