minor fixes
This commit is contained in:
parent
ebe5782fb0
commit
c53fa90930
|
@ -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
|
- there's probably some vulnerability that allows code execution
|
||||||
- comments SUCK!!! they look so awful
|
- comments SUCK!!! they look so awful
|
||||||
- it uses mysqli instead of something more secure like pdo
|
- 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 logout button is always visible even when you log out
|
||||||
- the navbar buttons are inconsistent
|
- the navbar buttons are inconsistent
|
||||||
- the colors are ugly!!!
|
- the colors are ugly!!!
|
||||||
|
|
2
com.php
2
com.php
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?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();
|
session_start();
|
||||||
include('config.php');
|
include('config.php');
|
||||||
|
|
3
sub.php
3
sub.php
|
@ -18,6 +18,9 @@ if ($_POST['url'] == "") {
|
||||||
if ($_POST['title'] == "") {
|
if ($_POST['title'] == "") {
|
||||||
die('Empty');
|
die('Empty');
|
||||||
}
|
}
|
||||||
|
if ($_SESSION['name'] == "") {
|
||||||
|
die('You are not logged in!');
|
||||||
|
}
|
||||||
$sql = "INSERT INTO posts (url, title, poster)
|
$sql = "INSERT INTO posts (url, title, poster)
|
||||||
VALUES ('". $_POST['url']. "', '". $_POST['title'] ."', '".htmlspecialchars($_SESSION['name'], ENT_QUOTES)."')";
|
VALUES ('". $_POST['url']. "', '". $_POST['title'] ."', '".htmlspecialchars($_SESSION['name'], ENT_QUOTES)."')";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue