Bojak Posted March 11, 2014 Share Posted March 11, 2014 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 More sharing options...
Bojak Posted March 11, 2014 Author Share Posted March 11, 2014 im thinking for css i echo divs and put the actual CSS in a CSS file. Link to comment https://forums.phpfreaks.com/topic/286895-creating-a-group-with-php/#findComment-1472244 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.