mirror of
https://github.com/Fluffy-Bean/image-gallery.git
synced 2025-06-26 19:36:17 +00:00
Progress on fixing shitty groups code?
This commit is contained in:
parent
be80166795
commit
89bab971f3
8 changed files with 252 additions and 122 deletions
|
@ -141,3 +141,26 @@ if (isset($_POST['title_submit'])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($_POST['new_group_submit'])) {
|
||||
if ($user_info->is_loggedin()) {
|
||||
$group_name = $_SESSION['username']." new image group";
|
||||
$sql = "INSERT INTO groups (group_name, author, image_list) VALUES('$group_name', '".$_SESSION['id']."', '')";
|
||||
|
||||
mysqli_query($conn, $sql);
|
||||
|
||||
$group_id = mysqli_insert_id($conn);
|
||||
|
||||
?>
|
||||
<script>
|
||||
window.location.href = "group.php?id=<?php echo $group_id; ?>";
|
||||
</script>
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<script>
|
||||
sniffleAdd('Denied', 'You must have an account to preform this action!', 'var(--red)', 'assets/icons/cross.svg');
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue