Jump to content
MakeWebGames

Recommended Posts

Posted

i tried everything i could think of so can some one please help what im trying to do is update the applicants mail count

function app_deny()
{
global $ir,$c,$h,$userid;
$_GET['ID'] = abs((int) $_GET['ID']);
mysql_query("DELETE FROM staffapps WHERE appID={$_GET['ID']}",$c);
mysql_query("INSERT INTO mail VALUES('', 0, 'System', '{$_GET['user']}', unix_timestamp(),'Your application' ,'Our staff has reviewed your staff application and unfortunately we feel you are not qualified to be a staff member. Feel free to fill in another application.')",$c);
$db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid=what goes here");
print "App Denied

[url='staff.php?action=appview']> Back[/url]";
}
Posted

This is an easy one :P

first off you must define $db as a global variable if your going to use it..

also "what goes here" is $userid which is the persons userid...lol

hope that helps

Curt

Posted

Curt is correct :-)

 

function app_deny()
{
global $db,$ir,$c,$h,$userid;
$_GET['ID'] = abs((int) $_GET['ID']);
mysql_query("DELETE FROM staffapps WHERE appID={$_GET['ID']}",$c);
mysql_query("INSERT INTO mail VALUES('', 0, 'System', '{$_GET['user']}', unix_timestamp(),'Your application' ,'Our staff has reviewed your staff application and unfortunately we feel you are not qualified to be a staff member. Feel free to fill in another application.')",$c);
$db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid=$userid");
print "App Denied

[url='staff.php?action=appview']> Back[/url]";
}
Posted

well this part ...

$db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid=$userid");

should already be in the mailbox.php it's not really needed in the app deny function...

It should update the user that is being denied if it's not then $userid should be changed to '{$_GET['user']}'

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