session_start(); if (!isset($_SESSION['uname']) && $_SESSION['uname'] == "") { header("location:login.php"); } ?> <?php if (isset($_REQUEST['wn'])) { include_once "wines.php"; $obj = new wines(); $wn = $_REQUEST['wn']; $wt = $_REQUEST['type_id']; $yr = $_REQUEST['yr']; $wid = $_REQUEST['winery_id']; $des = $_REQUEST['wd']; $pic = $_REQUEST['fileToUpload']; $obj->add_wine($wn, $wt, $yr, $wid, $des, $pic); header("location:viewAfterLogIn.php"); } ?> <html> <head> <title>Add Wine</title> </head> <body> <h><b>ADD WINE</b></h> <br> <form method="post" action="addwine.php"> <div>Wine Name: <input type="text" name="wn" required></div><br> <div>Wine Type: <select name="type_id"> <option value="0">--Select Wine Type--</option> <?php