Jump to content

Inbox Accept Help!


Bradley99

Recommended Posts

Hello everyone,

 

When someone starts an OC (Organised Crime) On my game, they invite 3 people. I was just testing it and found that everything is fine up until 1 point, the actual Inbox mail that the invited user gets. I can't click Accept or Reject?

 

Here's the bit of code i have...

 

if (strip_tags($_POST['inv']) == "inv_we"){
$inv_username=strip_tags($_POST['inv_username']);
$check = mysql_num_rows(mysql_query("SELECT * FROM users WHERE username='$inv_username'"));
if ($check == "0"){
echo "No such user.";
}elseif ($check != "0"){





if ($oc->we != "0"){
echo "You need to kick the Weapons expert before you invite someone else.";
}elseif ($oc->we == "0"){


$invite_text="
  <div align=center>You have been invited to join $username's Organised crime as the Weapons Expert, please
    choose one of the following options:<br>
    <input name=Decline type=submit id=Decline class=button value=Decline>
    |
    <input name=inv_button type=submit class=button id=inv_button value=Accept>
  </div><input type=hidden name=place value=we><input type=hidden name=oc_id value=$oc->id> ";

mysql_query("INSERT INTO `inbox` ( `id` , `to` , `from` , `message` , `date` , `read` )
VALUES (
'', '$inv_username', '$inv_username', '$invite_text', '$date', '0'
)");
echo "Weapons expert invited";
mysql_query("UPDATE oc SET we_inv='$inv_username' WHERE id='$oc->id'");

Link to comment
https://forums.phpfreaks.com/topic/226966-inbox-accept-help/
Share on other sites

You need to wrap form elemnts ni a form tag so it knows how and where to post it to.

 

$invite_text="<form action='this_php_file' method='post'>
  <div align=center>You have been invited to join $username's Organised crime as the Weapons Expert, please
    choose one of the following options:<br>
    <input name=Decline type=submit id=Decline class=button value=Decline>
    |
    <input name=inv_button type=submit class=button id=inv_button value=Accept>
  </div><input type=hidden name=place value=we><input type=hidden name=oc_id value=$oc->id </form>";

 

hope this helps

Link to comment
https://forums.phpfreaks.com/topic/226966-inbox-accept-help/#findComment-1171095
Share on other sites

This is from the inbox page, just saw it...

 

}
if (strip_tags($_POST['Accept_OC'])){
$oc_id=strip_tags($_POST['oc_id']);
if (strip_tags($_POST['place']) == "we"){
$use="we_inv";
$a="we";
$query= "SELECT * FROM oc WHERE we_inv='$username' AND id='$oc_id'";
}elseif (strip_tags($_POST['place']) == "ee"){
$use="ee_inv";
$a="ee";
$query= "SELECT * FROM oc WHERE ee_inv='$username' AND id='$oc_id'";

}elseif (strip_tags($_POST['place']) == "driver"){
$use="driver_inv";
$a="driver";
$query= "SELECT * FROM oc WHERE driver_inv='$username' AND id='$oc_id'";
}

Link to comment
https://forums.phpfreaks.com/topic/226966-inbox-accept-help/#findComment-1171184
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.