Example #1
0
 }
 if (isset($_GET['id'])) {
     $modelId = $_GET['id'];
     $model = $modelCon->getModel($modelId);
     if ($model->errorInfo()[2] == null) {
         $row = $model->fetch();
         $rowCount = count($row);
         if ($rowCount = 1) {
             $modelName = $row['model_name'];
             $makeId = $row['make_id'];
         }
     }
 }
 if (isset($_POST['hdnAction'])) {
     if ($_POST['hdnAction'] == 'update') {
         $result = $modelCon->updateModel($_POST['hdnModelId'], $_POST['txtModelName'], $_POST['txtMakeId']);
         $modelName = $_POST['txtModelName'];
         $makeId = $_POST['txtMakeId'];
         if ($result->errorInfo()[2] == null) {
             $editResult = true;
         } else {
             $editResult = $result->errorInfo()[2];
         }
     }
 }
 ?>
 <!DOCTYPE html>
 <html lang="en">
 <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">