Jump to content

Creating a group with php


Bojak

Recommended Posts

I am trying to create a group scrpt in php. the functionality would be just like facebooks groups. i am stuck but any help would be great. i understand i need functions and such but i dont know how to combine all of that with css. do i put that inside the functions? i dont really know what goes inside the functions either. 

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>

</head>

<body>
<?php
mysql_connect("localhost", "", "") or die(mysql_error());
echo "Connected to MySQL<br />";

mysql_query("INSERT INTO Groups  
($user, $userid, $groupid, $groupname, $cmt, $cmtid, $cmtcnt ) VALUES('$_GET[$user]', $_GET[$userid]', $_GET[$groupname]', $_GET[$groupid]', $_GET[$cmtid]', $_GET[$cmt], $_GET[$cmtcnt]' ) ") 

or die(mysql_error());  

$cmtcnt="";
$cmt="";
$cmtid="";
$user="";
$userid=""; 
$groupname="";

$_GET[$groupid];
$_GET[$groupname];
$_GET[$user];
$_GET[$userid];
$_GET[$cmtid];
$_GET[$cmtcnt];

function userAuth(){
	

if ( $authid != 1) {
		echo "you dont belong to this group";
} else {
		echo "Welcome to the group"; 	
}

	
	
	
	
	}
function buttonClicked() { 

if (isset($_GET[cfrm]) && $auid == 1) {
		echo "user accepted";
} else {
		echo "user denied"; 	
echo "<div> test </div>";

	}
	
	
}

?>
</body>
</html>
Edited by Bojak
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.