Jump to content
MakeWebGames

apply to gangs


jaymo

Recommended Posts

  • 3 months later...

You know jaymo, there are alot of links to resources for learning basic PHP and MySQL.

People are more willing to help those who atleast make an attempt at something, and, considering all of your posts have been requests for free GRPG mods, you should try learning or helping others get a good grasp on this engine.

This site is not just for giving out free modifications, it is more of a collaboration-experience where you can learn from both fellow PHP developers, and game owners.

Link to comment
Share on other sites

Something like this will do the job for you-

Call it apply.php

<?php

include 'header.php';

if ($user_class->gang != 0) <!-- check member is unganged -->

{

echo Message("Your in another gang already..leave current gang to apply here..."); <!-- Change text to suit needs -->

include 'footer.php';

die();

}

if (isset($_GET['gang']) && $user_class->gang == 0) <!-- if member is unganged proceed -->

{

$_GET['gang'] = (int)$_GET['gang'];

$targetgang = new Gang($_GET['gang']);

$gangleader = Get_ID($targetgang->leader);

$result = Send_Event("".$gangleader."", "Someone applied to your gang etc etc etc "); <!-- Change text to suit needs -->

echo Message("Your application has been sent "); <!-- Change text to suit needs -->

$when = time();

$result = mysql_query("INSERT INTO `gangapplications` (`userid`, `gangid`, `when`) VALUES ('".$user_class->id."', '".$_GET['gang']."', '".$when."')"); <!-- Create table in DB using info from this line ..very simple -->

}

else

{

echo Message("Apply via the gang page blah blah......");<!-- Change text to suit needs -->

include 'footer.php';

die();

}

?>

 

then add this to your viewgang.php to give a link to apply

<a href="apply.php?gang=<? echo "".$_GET['id'].""; ?> Apply to gang</a>

 

very simple and basic but will do the job

Link to comment
Share on other sites

You know jaymo, there are alot of links to resources for learning basic PHP and MySQL.

People are more willing to help those who atleast make an attempt at something, and, considering all of your posts have been requests for free GRPG mods, you should try learning or helping others get a good grasp on this engine.

This site is not just for giving out free modifications, it is more of a collaboration-experience where you can learn from both fellow PHP developers, and game owners.

I know m8, I'm sorry. I'm currently making my own mods for this engine and when I do I'm post them and help out a bit more. ;)

Link to comment
Share on other sites

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.   Paste as plain text instead

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