[php]include ‘header.php’;
$gname = mysql_real_escape_string($_POST[‘gname’]);
$gdesc = mysql_real_escape_string($_POST[‘gdesc’]);
$glogo = mysql_real_escape_string($_POST[‘glogo’]);
$submit = $_POST[‘submit’];
$creator = $myU->Username;
if($User){
if(!isset($submit)) {
if(!$gname) {
echo “Your group needs a name!”;
}
if (!$gdesc) {
echo “Please give a brief description of your group!”;
}
if (!$glogo) {
echo "Please give your group a logo!";
}
else {
mysql_query("INSERT INTO Groups (Name, Description, Logo, Creator)
VALUES('$gname', '$gdesc', '$glogo', '$creator')");
header("Location: Profile.php?ID=$myU->ID");
[/php]