minor fixes

This commit is contained in:
kit 2024-02-23 20:45:08 +00:00
parent ebe5782fb0
commit c53fa90930
3 changed files with 4 additions and 2 deletions

View File

@ -22,7 +22,6 @@ this was created on garbage free hosting so it probably works anywhere you can g
- there's probably some vulnerability that allows code execution
- comments SUCK!!! they look so awful
- it uses mysqli instead of something more secure like pdo
- i think you can post without an account and i forgot to fix that
- the logout button is always visible even when you log out
- the navbar buttons are inconsistent
- the colors are ugly!!!

View File

@ -1,6 +1,6 @@
<?php
// this is the script that actually submits the post into the db
// this is the script that actually submits the comment into the db
session_start();
include('config.php');

View File

@ -18,6 +18,9 @@ if ($_POST['url'] == "") {
if ($_POST['title'] == "") {
die('Empty');
}
if ($_SESSION['name'] == "") {
die('You are not logged in!');
}
$sql = "INSERT INTO posts (url, title, poster)
VALUES ('". $_POST['url']. "', '". $_POST['title'] ."', '".htmlspecialchars($_SESSION['name'], ENT_QUOTES)."')";