Jump to content

mandukar

Members
  • Posts

    58
  • Joined

  • Last visited

    Never

Everything posted by mandukar

  1. ok, would that go somthing like... [quote]<? if ($view == Give) { print "tgive some members some money."; print "<form method=post action=admin.php?view=give&step2=give>"; print "Donate <input type=text size=5 name=amount value=0> <select name=type><option value=credits>Credits</option></select> <input type=text name=aid> to player. <input type=submit value=give>"; print "</form>"; if ($step2 == give) { if ($amount > $stat[$type]) { print "You don't have enough $type."; } else {   mysql_query("update players set $type=$type-$amount where id=$stat[id]");               print "You donated $amount $type to the player."; $give = mysql_query("UPDATE MEMBERS SET CASH=CASH+$amount WHERE USERNAME='$username'");             }         }       } ?>[/quote]
  2. I think it would be somthing like.... [quote] Welcome to the admin panel. What will you do? <ul> <li><A href=addupdate.php>Add Update</a> <li><a href=admin.php?view=donate>Donate</a> <li><a href=admin.php?view=add>Add Staff</a> </ul> <?php if ($view == del) { print "<form method=post action=admin.php?view=del&step=del>Delete ID <input type=text name=did>. <input type=submit value=Delete></form>"; if ($step == del) { if ($did != 1) { mysql_query("delete from players where id=$did"); print "You deleted ID $did."; } else { print "No deleting the owner."; } } } if ($view == add) { print "<form method=post action=admin.php?view=add&step=add>Add ID <input type=text name=aid> as an <select name=rank><option value=Member>member</option><option value=Admin>admin</option></select>. <input type=submit value=Add></form>"; if ($step == add) { if ($aid != 1) { mysql_query("update players set rank='$rank' where id=$aid"); print "You added ID $aid as a $rank."; } } } ?> </quote] this is my admin panel and it works on the basis of what you want.. where it says print you'd simple replace it with a database script to call your info from the database i think.. letme know how it works out.
  3. another question... how would I go about giving players money out of thin air kind of thing.. by using admin.php give me a shout if you need the admin script.
  4. I got it working, the - and + had to be swoped around. many thanks for the help :D
  5. it works but it has a - infront of the money, which means its taken it away.. and the player can't spend money.
  6. many thanks i'll let you know if it works
  7. hi I'm very new with php but understand most of the basics.. i'm in abit of a headace mode atm, and was wondering if someone could help me.. I am trying to enable players to tranfer money from there bank to another players bank. I have been able to get it so that it'll take money from the player but the other player doesn't get it. heres a copy of the script.. any help will be most greatful from mandukar. <? <ul> <li><a href=donate.php?view=donate>Donations</a> </ul> <? if ($view == donate) { print "Please donate to a player, and help it out financially."; print "<form method=post action=donate.php?view=donate&step2=donate>"; print "Donate <input type=text size=5 name=amount value=0> <select name=type><option value=credits>Credits</option><option value=platinum>Platinum</option></select> <input type=text name=aid> as an <select name=donate> to player. <input type=submit value=Donate>"; print "</form>"; if ($step2 == donate) { if ($amount > $stat[$type]) { print "You don't have enough $type."; } else { mysql_query("update players set $type=$type-$amount where id=$stat[id]"); print "You donated <b>$amount $type</b> to the player."; mysql_query("update players set credits='$bank' where id=$aid"); } } } ?>
×
×
  • 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.