Jump to content
  • 0

Help for this php AccountManager


Question

Posted

gia sas paides exo katevasi to account manager tou Pauler kai den dini item sto char an mpori kapios na me help gt o Pauler den Apantai Thnx.

<?php
session_start();

include ('connect.php');

if(!empty($_POST['submit'])) {
$name = $_POST['name'];
$itemid = $_POST['item'];
$count = $_POST['count'];

if ($name && $itemid && $count) {

$check_one = mysql_num_rows(mysql_query("SELECT * FROM characters WHERE char_name='".$name."'"));

if ($check_one != 0) {

$check_two = mysql_num_rows(mysql_query("SELECT * FROM etcitem WHERE item_id='".$itemid."'"));

if ($check_two != 0) {

$row = mysql_fetch_assoc(mysql_query("SELECT * FROM characters WHERE char_name='".$name."'"));
$obj_Id = $row['obj_Id'];

mysql_query("INSERT INTO items VALUES ('".$obj_Id."', '', '".$itemid."', '".$count."', '0', 'INVENTORY', '0', '0', '0', '', '0', '0', '-1')");
echo "<b>Your Item Has Been Inserted.</b>";

}
else {
echo "<b>This item does not exist.</b>";
}

}
else {
echo "<b>This characters does not exist.</b>";
}

}

}
?>

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

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