diff --git a/item.php b/item.php
index 6cca993..9fbbb38 100644
--- a/item.php
+++ b/item.php
@@ -19,7 +19,8 @@ $q->bindParam(':id',$id,PDO::PARAM_INT);
$q->execute();
$item = $q->fetch();
if(!$item) {
- die("go fuck yourself (can't find item)"); // todo: redirect to 404
+ header('location: /error?err=404');
+ exit;
}
?>
diff --git a/place.php b/place.php
new file mode 100644
index 0000000..ec150ed
--- /dev/null
+++ b/place.php
@@ -0,0 +1,41 @@
+isLoggedIn()) {
+ header('location: /login');
+ exit;
+}
+
+if(!isset($_GET["id"])) {
+ header("Location: ?id=".$_SESSION['user']);
+} else {
+ $id = (int)$_GET["id"];
+}
+$q = $con->prepare("SELECT * FROM games WHERE id = :id");
+$q->bindParam(':id',$id,PDO::PARAM_INT);
+$q->execute();
+$game = $q->fetch();
+if(!$game) {
+ header('location: /error?err=404');
+ exit;
+}
+?>
+
+
+
+header();
+?>
+
+
|
+
+
yes i am FUCKING AGAIN still not hired to make html
+
this game is called
+
with id
+
thats all i have to say
+
+
diff --git a/user.php b/user.php
index 62abdda..f11e627 100644
--- a/user.php
+++ b/user.php
@@ -19,7 +19,8 @@ $q->bindParam(':id',$id,PDO::PARAM_INT);
$q->execute();
$requestUser = $q->fetch();
if(!$requestUser) {
- die("go fuck yourself (can't find user)"); // todo: redirect to 404
+ header('location: /error?err=404');
+ exit;
}
?>