?> <html> <head> <title>Edit Wine</title> <script> </script> </head> <body> <?php $row = null; if (isset($_REQUEST['wid'])) { require_once "wines.php"; $obj = new wines(); $wid = $_REQUEST['wid']; $obj->get_wine($wid); $row = $obj->fetch(); } ?> <?php if (isset($_REQUEST['wn'])) { include_once "wines.php"; $obj1 = new wines(); $wid = $_REQUEST['wid']; $wn = $_REQUEST['wn']; $wt = $_REQUEST['type_id']; $yr = $_REQUEST['yr']; $wid = $_REQUEST['winery_id']; $des = $_REQUEST['wd']; $obj1->edit_wine($wid, $wn, $wt, $yr, $wid, $des);