Results 1 to 10 of 10

Thread: [RESOLVED] PHP Help please!

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2007
    Posts
    8

    [RESOLVED] PHP Help please!

    So, I have a script that will allow users to post their account items onto a database where other users can post their items/ game currency onto the trade..... I'm sure it was hard to understand any of that, it's hard to explain. Anyway, the page where you put your items to trade is a page where i have a checkbox generated for each item you have. For example:

    Code:
    				while($itemname = $getinvitemsres->fetch_assoc())
    				{
    					$id = $itemname['item_id'];
    					$user_ownid = $itemname['id'];
    					
    					$getiteminfoagain = "select * from items where id = '".$id."'";
    					$getinfoagainres = $db->query($getiteminfoagain);
    					while($infoirem = $getinfoagainres->fetch_assoc())
    					{
    						$itemnamelol = $infoirem ['name'];
    						$itemidid = $infoirem ['id'];
    						$description = $infoirem['description'];
    						$rarity = $infoirem['rarity'];
    						$otheringo = $infoirem['other'];
    						$image = $infoirem['image'];
    						
    						echo "<tr>
    						<td width='15%' align='center' valign='middle' style='border: 1px solid #CCCCCC;'><input type='checkbox' name='UNKNOWN' value='$itemnamelol'></td>
    						<td width='85%' valign='middle' style='border: 1px solid #CCCCCC;'><img src='/images/items/$image' width='85' height='85' alt='$description'>
    						$itemnamelol - <font color='green'>$rarity</font> <font color='orange'>$otheringo</font></td>
    					</tr>";
    					}
    				}
    				echo "</table><input type='submit' value='Create trade!' name='submit' /></form></center>";
    that code gets all of the users items from their item table and puts them next to a check box. if you check the checkbox that item will be up for trading... ect. But, the problem i'm having is: since its unknown what the item is or what the value of the checkbox will be (its based on what the user has in their inventory) how can I get the value of the checkbox into an array (an array because it needs to be different for each of the items checked) and then I wull be able to use that array to continue on with the trading... If this doesnt make sense then please tell me so I can revise my post. Thank you so much in advance this helps a lot!
    Last edited by Pankirk; Aug 11th, 2008 at 01:02 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width