Kryllster Posted October 10, 2014 Share Posted October 10, 2014 MySQL version 5.1.73-cll I can't seem to get the inventory table to insert the information I have stared in an array any help would be appreciated!! <?php $username = $_SESSION['username']; ini_set('display_errors',1); error_reporting(E_ALL); //include "php/db/db_config.php"; include "php/db/db_config.php"; include "php/db/item_connect.php"; $id = $items_id['id']; $player = $account_info['player_id']; //Update database $sql = mysqli_query($my_database,"INSERT INTO inventory ( player_id, username, id ) VALUES('$player', '$username', '$id')"); //echo values of item id echo "<div class=\"loot\">"; echo "<b>Required Level:" . $items_id['requ_level'] . "</b><br />"; echo "<b>Name:" . $items_id['name'] . "</b><br />"; echo "<b>Min Str:" . $items_id['min_str'] . "<br />"; echo "<b>Min Int:" . $items_id['min_int'] . "<br />"; echo "<b>Min Dex:" . $items_id['min_dex'] . "<br />"; echo "<b>Type:" . $items_id['type']. "<br />"; echo "<b>Min Physical Dmg:" . $items_id['min_dmg'] . "<br />"; echo "<b>Max Physical Dmg:" . $items_id['max_dmg'] . "<br />"; echo "<b>Min Magic Dmg:" . $items_id['mag_attk_min'] . "<br />"; echo "<b>Max Magic Dmg:" . $items_id['mag_attk_max'] . "<br />"; echo "<b>Phys Defense:" . $items_id['phy_def'] . "<br />"; echo "<b>Magical Defense:" . $items_id['mag_def'] . "<br />"; echo "</div>"; ?> I get no errors or notices and the info fields show up as being populated. Quote Link to comment https://forums.phpfreaks.com/topic/291548-unable-to-get-insert-to-work-correctly/ Share on other sites More sharing options...
Solution Kryllster Posted October 10, 2014 Author Solution Share Posted October 10, 2014 Sorry for the post I had a problem with the sql in the inventory table I figured it out right after this post sorry. Quote Link to comment https://forums.phpfreaks.com/topic/291548-unable-to-get-insert-to-work-correctly/#findComment-1493210 Share on other sites More sharing options...
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.