My First Web application .. a real shitty one
My First Web application .. a real shitty one
This commit is contained in:
1 parent
610af7dff3
commit
34753111ed
106 files changed
+41611
No files matched your search
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
error_reporting(0);
|
||||
session_start();
|
||||
|
||||
if(isset($_SESSION['user']))
|
||||
{
|
||||
$user=$_SESSION['user'];
|
||||
}
|
||||
else
|
||||
{
|
||||
header("Location: ../views/signinPage.php?message=".urlencode("Login Again!"));
|
||||
}
|
||||
$aerror = "";
|
||||
if(isset($_POST['addGroup']))
|
||||
{
|
||||
$name = $_POST['name'];
|
||||
|
||||
include_once('../models/group.php');
|
||||
if(group::insertGroup($name))
|
||||
{
|
||||
if(group::insertMember($name, $user['username']))
|
||||
{
|
||||
$aerror = "Group Created!";
|
||||
header("Location: ../views/allgroups.php");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$aerror = "Cannot Create a new Group!";
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in new issue
Block a user