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
https://forums.phpfreaks.com/topic/142588-solved-help-needed-read-further/
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?

Archived

This topic is now archived and is closed to further replies.

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