Edit file File name : changequickllypassdatetime.php Content :<?php session_start(); include("../include/config.php"); include("../include/functions.php"); include("../include/simpleimage.php"); validate_admin(); if($_REQUEST['update']=='Update Detail'){ $sub_id =mysqli_real_escape_string($_REQUEST['sub_id']); $user_id =mysqli_real_escape_string($_REQUEST['user_id']); $order_id =mysqli_real_escape_string($_REQUEST['order_id']); $subscription_status =mysqli_real_escape_string($_REQUEST['subscription_status']); $cancel_status =mysqli_real_escape_string($_REQUEST['cancel_status']); $nextorderdate =mysqli_real_escape_string($_REQUEST['nextorderdate']); $other_reason_for_cancel =mysqli_real_escape_string($_REQUEST['other_reason_for_cancel']); if($other_reason_for_cancel){ $reason_for_cancel=$other_reason_for_cancel; } else { $reason_for_cancel=$reason_for_cancel=mysqli_real_escape_string($_REQUEST['reason_for_cancel']); } $obj->query("update tbl_quicklly_pass_subscription set subscription_status=$subscription_status,cancel_status=$cancel_status,reason_for_cancel='$reason_for_cancel',next_order_date='$nextorderdate' where sub_id='$sub_id' and user_id='$user_id' and order_id='$order_id'"); $_SESSION['sess_msg']="Status updated successfully.!";?> <script> parent.location="quicklly-pass-subscription-report.php"; </script> <?php } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title><?php echo SITE_TITLE; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="css/admin.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td align="left" valign="middle" class="headingbg bodr text14"><em><img src="images/arrow2.gif" width="21" height="21" hspace="10" align="absmiddle" /></em>Admin: Cancel Subscription On Order ID #<?php echo $_REQUEST['order_id']; ?></td> </tr> <tr> <td height="100" align="left" valign="top" bgcolor="#f7faf9" class="bodr"> <table width="100%" cellpadding="0" cellspacing="10"> <tr> <td class="paddBot11 paddRt14" colspan="2"><h2>Delivery Address</h2></td> </tr> <tr> <td class="paddBot11 paddRt14" colspan="2"> <table width="100%" border="0" cellspacing="10" cellpadding="0"> <form name="frm" method="POST" enctype="multipart/form-data" action=""> <input type="hidden" name="order_id" value="<?php echo $_REQUEST['order_id'];?>" /> <input type="hidden" name="sub_id" value="<?php echo $_REQUEST['sub_id'];?>" /> <input type="hidden" name="user_id" value="<?php echo $_REQUEST['user_id'];?>" /> <tr> <td width="33%" align="right" class="paddBot11 paddRt14"><strong>Subscription Status</strong></td> <td width="67%" align="left" class="paddBot11"> <select name="subscription_status" id="ddlOrderStatus" style="width:240px;" > <option value="1">Active</option> <option value="0">Cancel</option> </select> </td> </tr> <tr> <td width="33%" align="right" class="paddBot11 paddRt14"><strong>Cancel Status</strong></td> <td width="67%" align="left" class="paddBot11"> <select name="cancel_status" id="ddlOrderStatus" style="width:240px;" > <option value="0">Active</option> <option value="1">Cancel</option> </select> </td> </tr> <tr> <td width="33%" align="right" class="paddBot11 paddRt14"><strong>Reason For Cancel</strong></td> <td width="67%" align="left" class="paddBot11"> <select name="reason_for_cancel" id="reason_for_cancel" onchange="otherreason()"> <option value="Product is taking too long to be delivered">Product is taking too long to be delivered</option> <option value="Change of mind">Change of mind</option> <option value="Decided alternative product">Decided alternative product</option> <option value="Product cost high">Product cost high</option> <option value="Product quality not up to mark">Product quality not up to mark</option> <option value="Other">Other</option> </select> </td> </tr> <tr id="otherreason" style="display:none;"> <td width="33%" align="right" class="paddBot11 paddRt14"><strong>Other Reason</strong></td> <td width="67%" align="left" class="paddBot11"><textarea id="other_reason_for_cancel" name="other_reason_for_cancel" rows="5" cols="40"></textarea></td> </tr> <tr></tr><tr></tr> <tr> <td width="33%" align="right" class="paddBot11 paddRt14"><strong>Next Order Date</strong></td> <td width="67%" align="left" class="paddBot11"> <input type="text" name="nextorderdate" placeholder="YYYY-MM-DD" value="<?php echo $_REQUEST['next_order_date'];?>" required> </td> </tr> <tr> <td width="33%" align="right" class="paddRt14 paddBot11"> </td> <td width="67%" align="left" class="paddBot11"><input type="submit" name="update" value="Update Detail" class="btn" onclick="return validateData();"/> </td> </form> </table></td> </tr> </table> <script type="text/javascript"> function validateData(){ var x = document.getElementById("reason_for_cancel").value; var otv = document.getElementById("otherreason"); if(x=='Other'){ otv.style.display='table-row'; var other_reason_for_cancel = document.getElementById("other_reason_for_cancel").value; if(other_reason_for_cancel==''){ document.getElementById("other_reason_for_cancel").focus() return true; } else { return true; } } else { return true; } } function otherreason() { var otv = document.getElementById("otherreason"); var x = document.getElementById("reason_for_cancel").value; if(x=='Other'){ otv.style.display='table-row'; } } </script> </body> </html> Save