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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

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.