fixing the old project errors

This commit is contained in:
Anas Rashid committed 2026-04-29 00:42:13 +02:00
1 parent 34753111ed
commit 4ff0c03c62
23 files changed
+117 -278

No files matched your search

+5 -6
View File
@@ -1,7 +1,4 @@
<?php
error_reporting(0);
session_start();
if(isset($_SESSION['user']))
{
$user=$_SESSION['user'];
@@ -9,6 +6,7 @@ if(isset($_SESSION['user']))
else
{
header("Location: ../views/signinPage.php?message=".urlencode("Login Again!"));
exit();
}
$aerror = "";
if(isset($_POST['addGroup']))
@@ -16,12 +14,13 @@ if(isset($_POST['addGroup']))
$name = $_POST['name'];
include_once('../models/group.php');
if(group::insertGroup($name))
$groupId = group::insertGroup($name);
if($groupId)
{
if(group::insertMember($name, $user['username']))
if(group::insertMember($groupId, $user['username']))
{
$aerror = "Group Created!";
header("Location: ../views/allgroups.php");
header("Location: ../views/allgroups.php");
}
}
else