stuffradio Posted November 30, 2007 Share Posted November 30, 2007 I'm making a Trade System for a pet game. I'm making the form for setting up the trade. There are some duplicate items(these are allowed). The checkbox for what you want to trade contains the item id. I want to know how to check the item_id id so I can prevent duplicate items that aren't checked from being affected from the query. Link to comment https://forums.phpfreaks.com/topic/79524-solved-php-variable-problem/ Share on other sites More sharing options...
MadTechie Posted November 30, 2007 Share Posted November 30, 2007 i'm not 100% sure what you mean.. but to clear dups from an array you can just use array_unique Link to comment https://forums.phpfreaks.com/topic/79524-solved-php-variable-problem/#findComment-402783 Share on other sites More sharing options...
stuffradio Posted November 30, 2007 Author Share Posted November 30, 2007 Okay I'll try and explain a bit better... I'm sure you all know what a trading system is, so I won't explain that I have a list of all the items in your inventory that are not currently being traded. The list displays one item line by line. On each line there is a checkbox that has the value of that item id. I'm using that Item id to setup the trade, get the item info. I want to know how I can also get the id of the item. The id is the first column in the table, which is the primary key. I would like to use the id to tell it which item to do what with in case the other user has a duplicate item. I hope that clears it up for you. Link to comment https://forums.phpfreaks.com/topic/79524-solved-php-variable-problem/#findComment-403006 Share on other sites More sharing options...
stuffradio Posted December 2, 2007 Author Share Posted December 2, 2007 Nevermind... I solved the issue. Thanks to those who responded anyways! Link to comment https://forums.phpfreaks.com/topic/79524-solved-php-variable-problem/#findComment-403999 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.