master
flejk 3 years ago
parent 5e124aa2b4
commit d1f577f74a

@ -17,11 +17,11 @@ $ibu = $record["ibu"];
$brewery_id = $record["brewery_id"];
$brewery = getRecord($pdo, "brewery", $brewery_id )["name"];
require("view/mainContent/mainContent.php");
require("view/mainContent/beerExtraInfo.php");
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
if(isThisBound($pdo, "list", $_GET["id"], $_SESSION["id"])){
$rating = getRating( $pdo, $_GET["id"], $_SESSION["id"])["rating"];
require("view/mainContent/beerExtraInfo.php");
showStars($_GET["id"], $rating);
unfollowButton("list", $_GET["id"]);
} else {

@ -63,7 +63,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">
<label>Parent Brewery</label>

@ -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">

Loading…
Cancel
Save