Edit file File name : adddriver.php Content :<?php session_start(); include("../include/config.php"); include("../include/functions.php"); include("../include/simpleimage.php"); validate_admin(); if($_REQUEST['submitForm']=='yes'){ $order_id=mysqli_real_escape_string($GLOBALS['conn'],$_REQUEST['order_id']); $order_driver=mysqli_real_escape_string($GLOBALS['conn'],$_REQUEST['order_driver']); $obj->query("update $tbl_order set deliverby='$order_driver',is_send_to_vendor='No' where id='$order_id' "); $_SESSION['sess_msg']="driver posted successfully.!"; } ?> <!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" /> <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script> <link rel="stylesheet" href="calender/css/jquery-ui.css"> <script src="calender/js/jquery-ui.js"></script> </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: Add Driver On Order ID : <?php echo $_REQUEST['order_id']; ?></td> </tr> <tr> <td height="100" align="left" valign="top" bgcolor="#f7faf9" class="bodr"><form name="frm" method="POST" enctype="multipart/form-data" action="" onSubmit="return validate(this)"> <input type="hidden" name="submitForm" value="yes" /> <input type="hidden" name="order_id" value="<?php echo $_REQUEST['order_id'];?>" /> <table width="100%" cellpadding="0" cellspacing="0"> <tr> <td align="center" colspan="2" style="color:#C00;"><?php echo $_SESSION['sess_msg'];$_SESSION['sess_msg']=''; ?></td> </tr> <tr> <td width="33%" align="right" class="paddBot11 paddRt14"><strong>Assign Driver</strong></td> <td width="67%" align="left" class="paddBot11"><select name="order_driver" style="width:240px;" > <option value="">Select Status</option> <?php $statusArr=$obj->query("select * from tbl_driver where status=1 "); $current_status=getField('deliverby',$tbl_order,$_REQUEST['order_id']); while($resultStatus=$obj->fetchNextObject($statusArr)){ ?> <option value="<?php echo $resultStatus->fname.$resultStatus->lname; ?>" <?php if(($resultStatus->fname.$resultStatus->lname)==$current_status){ ?>selected<?php } ?>><?php echo stripslashes($resultStatus->fname.' '.$resultStatus->lname); ?></option> <?php } ?> </select></td> </tr> <tr> <td align="right" class="paddRt14 paddBot11"> </td> <td align="left" class="paddBot11"> </td> </tr> <tr> <td width="33%" align="right" class="paddRt14 paddBot11"> </td> <td width="67%" align="left" class="paddBot11"><input type="submit" name="submit" value="Submit" class="submit" border="0" /> </td> </tr> </table> </form></td> </tr> <tr> <td align="center"></td> </tr> </table> </td> </tr> </table> </body> </html> Save