<?php 
include_once 'Que.php';
$where = " ";
$sType = "dvd";
if (isset($_POST['upSearch'])) {
    $sTxt = $_POST['upSearchTxt'];
    $sType = $_POST['searchType'];
    if (strlen($sTxt) < 1) {
        $addError[] = "enter something";
    } elseif (isset($sType)) {
        $addError[] = "invalid type";
    } else {
        $where = "-WHERE item_no LIKE '%" . $sTxt . "%' OR title LIKE '%" . $sTxt . "%'";
    }
}
inventory($sType, $where);
?>
                 
                  <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
                </div>
                <div id="update" style="height:450px;overflow:auto;">
                  <h1>Update</h1>
                   <?php 
if (isset($upError)) {
    foreach ($upError as $upError) {
        ?>
                     <div class="alert alert-danger">
                        <i class="glyphicon glyphicon-warning-sign"></i> &nbsp; <?php 
        echo $upError;
        ?>
                     </div>
                  </form></div>
                  <?php 
include_once 'Que.php';
$where1 = " ";
$sType1 = "dvd";
if (isset($_POST['upSearch1'])) {
    $sTxt1 = $_POST['upSearchTxt1'];
    $sType1 = $_POST['searchType1'];
    if (strlen($sTxt1) < 1) {
        $addError[] = "enter something";
    } elseif (isset($sType1)) {
        $addError[] = "invalid type";
    } else {
        $where1 = "-WHERE item_no LIKE '%" . $sTxt1 . "%' OR title LIKE '%" . $sTxt1 . "%'";
    }
    inventory($sType1, $where1);
}
//                    inventory($sType, $where);
?>
                  <script type="text/javascript">
                    function selectedUpdate(val){
                            record = val.split(",");
                            document.getElementById("itNo").value=record[0];
                            document.getElementById("title1").value=record[1];
                            document.getElementById("stats1").value=record[2];
                            alert("wewewew");
                    }
                   </script>
                  <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
                </div>
                <!-- <div id="delete" style="height:450px;overflow:auto;">