|
|
|
@ -17,10 +17,11 @@ $description = $_POST["description"];
|
|
|
|
|
if(!is_null($name)){
|
|
|
|
|
$conn = $pdo;
|
|
|
|
|
try {
|
|
|
|
|
$sql = "INSERT INTO article ( name, region, description ) values ( '$name', '$region', '$description' );";
|
|
|
|
|
$sql = "INSERT INTO brewery ( name, region, description ) values ( '$name', '$region', '$description' );";
|
|
|
|
|
echo $sql;
|
|
|
|
|
$conn->exec($sql);
|
|
|
|
|
} catch (PDOException $e) {
|
|
|
|
|
echo "Error in $from: Not Found";
|
|
|
|
|
echo "Error!";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// header("location: ../insertWhat.php");
|
|
|
|
@ -51,7 +52,7 @@ if(!is_null($name)){
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<label>Description</label>
|
|
|
|
|
<textarea rows="4" cols="50" name="decsription" class="form-control"></textarea>
|
|
|
|
|
<textarea rows="4" cols="50" name="description" class="form-control"></textarea>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
|
|
|
|
<input type="submit" class="btn btn-primary" value="Submit">
|
|
|
|
|