Jump to content

Finding Value Of Last Listbox Selected


MoFish

Recommended Posts

Hello.

 

i'm trying to set the last selected username to a variable called $lastplayer.

 

the problem im having is. the number of "$NumPlayers" changes depending on what the user selected from the page before. This can range from 4-10.

 

How can i find which user was last selected from the last listbox?

 

MoFish

 

		mysql_select_db($database_ReportConnection, $ReportConnection);
		$query_Connection = "SELECT * FROM player_table";
		$Connection = mysql_query($query_Connection, $ReportConnection) or die(mysql_error());

		while ($myrow = mysql_fetch_array($Connection)) {
			$opt .= '<option value="'.$myrow['PlayerName'].'">'.$myrow['PlayerName'].'</option>';
		}

		for($i=1;$i<=$NumPlayers;++$i){
				echo '<div style="padding:5px">';
				echo 'Player : <select name="LstBox'.$i.'">'.$opt.'</select>';
				echo '</div>';
		}

 

also, why does the following code not work?

 

<?php echo "<img src='images/' . $image . ' />";  ?>

Link to comment
https://forums.phpfreaks.com/topic/49165-finding-value-of-last-listbox-selected/
Share on other sites

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.