killah Posted January 27, 2009 Share Posted January 27, 2009 I am a game creator.. I am wanting to display user's with a car. But when i do select it fetch's all user's. Here is my code i am currently using: $socUsers = mysql_query("SELECT u.playername,u.ID,c.carID,c.carOWNER,c.carHP,c.carTYPE,ct.newNAME FROM km_users u LEFT JOIN cars_garage c ON c.carOWNER = u.ID LEFT JOIN cars_new ct ON ct.newID = c.carTYPE WHERE u.ID != ".$me['ID']) or die(mysql_error()); echo ' Select a user from the drop down list. These are the current owner\'s of car\'s.<br><br> <form action="'.$_SERVER['PHP_SELF'].'?x=garage&y=race&XID='.$_GET['XID'].'" method="post"> <b>Car, Owner, HP:</b> <select name="user">'; while($su = mysql_fetch_assoc($socUsers)) { echo ' <option value="'.$su['ID'].'">'.$su['newNAME'].' | '.$su['playername'].' | '.$su['carHP'].'</option>'; } echo ' </select><br> Type: <select name="type"><option value="cash">Cash</option><option value="pinks">Pink Slips</option></select><br> Cash: <input type="text" name="cash"> If cash is selected as type.<br> <input type="submit" value="Send Race Challenge"> </form>'; Any help will be appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/142588-solved-help-needed-read-further/ Share on other sites More sharing options...
fenway Posted January 27, 2009 Share Posted January 27, 2009 Don't mark "solved" unless you post the solution!!! Quote Link to comment https://forums.phpfreaks.com/topic/142588-solved-help-needed-read-further/#findComment-747561 Share on other sites More sharing options...
killah Posted January 27, 2009 Author Share Posted January 27, 2009 My solution has got nothing to do with the code above. I solved my solution on adding a new row to the users table called car_equiped. Since the person i was doing the job for wanted it different. Happy? Quote Link to comment https://forums.phpfreaks.com/topic/142588-solved-help-needed-read-further/#findComment-747567 Share on other sites More sharing options...
fenway Posted January 27, 2009 Share Posted January 27, 2009 My solution has got nothing to do with the code above. I solved my solution on adding a new row to the users table called car_equiped. Since the person i was doing the job for wanted it different. Happy? It's not for me to be "happy" -- the purpose of these forums is to SHARE problems & solutions. Give & take. Capiche? Quote Link to comment https://forums.phpfreaks.com/topic/142588-solved-help-needed-read-further/#findComment-747778 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.