diff --git a/account.php b/account.php
new file mode 100644
index 0000000..066f950
--- /dev/null
+++ b/account.php
@@ -0,0 +1,30 @@
+
+
+
+
+
+ Account
+
+
+
+
+
+
+
+
+
+
Account settings
+ Oh hi ".$_SESSION["username"].".";
+ echo "
Logout";
+ } else {
+ echo "
You must be logged in to change your account settings!
";
+ echo "
Sign up!";
+ }
+ ?>
+
+
+
+
+
diff --git a/edit.php b/edit.php
index 5f585b4..309666b 100644
--- a/edit.php
+++ b/edit.php
@@ -10,7 +10,39 @@
-
+ prepare("UPDATE swag_table SET alt=? WHERE id=?");
+ $sql->bind_param("si", $alt, $id);
+
+ $alt = $_POST['alt'];
+ $id = $_POST['id'];
+
+ if ($sql->execute()) {
+ header("Location:https://superdupersecteteuploadtest.fluffybean.gay/image.php?id=".$_POST['id']."&update=success");
+ } else {
+ $error = "Something fuckywucky";
+ }
+ } else {
+ $error = "No description/alt, pls give";
+ }
+ } else {
+ $error = "You do not have edit rights";
+ }
+ }
+
+ ?>
Modify Information
@@ -21,43 +53,12 @@
Information updated!";
- } elseif ($_GET["r"] == "fail") {
- // Upload failed
- echo "
Something fuckywucky
";
- } elseif ($_GET["r"] == "noinfo") {
- // No info was present
- echo "
No description/alt, pls give
";
+ if (isset($error)) {
+ echo "
".$error."
";
}
?>
- prepare("UPDATE swag_table SET alt=? WHERE id=?");
- $sql->bind_param("si", $alt, $id);
-
- $alt = $_POST['alt'];
- $id = $_POST['id'];
-
- if ($sql->execute()) {
- //header("Location:edit.php?r=success");
- header("Location:https://superdupersecteteuploadtest.fluffybean.gay/image.php?id=".$_POST['id']."&update=success");
- } else {
- header("Location:edit.php?r=fail");
- }
- }
- }
- ?>
-