hey im trying to make a code that allows a user to create a group, join it, leave it and simlar basics like that however im having some trying making the leave it part would be nice if someone can check my code and point out the error and send me on the right path ^^
[php]<?php // the login I have database connection in here as I don’t include the header in this case till after the php
session_start();
require(“config.php”);
require(“header.php”);
?>
Group Name | |
Or join a group:
<?php $sql = "SELECT * FROM groups ORDER BY idgroups ASC LIMIT 1,2";$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
if(isset($_SESSION[‘USERNAME’]) == true) {
$name = $_SESSION[‘ID’]; //Need a way for this to know what name is logged on the withdraw function is just this reseting to 0 so when this works that will work as well.
echo "<a href=Group1.php?id= $name ";
}
$sql = “SELECT * FROM groups
ORDER BY idgroups ASC LIMIT 2,3”;
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
echo “
” . $row[‘group_name’] . “
”;$sql = “SELECT * FROM groups
ORDER BY idgroups ASC LIMIT 3,4”;
$result = mysql_query($sql);
$row = mysql_fetch_assoc($result);
echo “
” . $row[‘group_name’] . “
”;?> <?php require("footer.php"); ?>[/php]