Jump to content

[SOLVED] Help Needed. Read Further


killah

Recommended Posts

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.