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>
Link to comment
https://forums.phpfreaks.com/topic/286895-creating-a-group-with-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.