Jump to content

[SOLVED] Multiple select options.


DeanWhitehouse

Recommended Posts

I have made a multiple select box, but when i echo the post , its value is always the last selected option, how can i get all the options?

 

This is some of the code

<?php
		if(isset($_POST['request_choices']))
		{
			echo $_POST['request_choices'];
		}
?>
	<form action="?site=<?php echo $_GET['site'];?>" method="post">
	Request a report regarding '<?php echo $site; ?>' <span style="font-size:smaller"><a href="Javascript:void();">Change Site</a></span><br>
		<br>
		<span style="font-size:small">If you do not wish to recieve a general overview please select the areas you wish to be in the report,otherwise leave blank.</span><br><span style="font-size:smaller;">To select multiple options , hold down the ctrl key.</span><br>
		<select name="request_choices" multiple="multiple" style=" width:170px;height:70px;">
			<option value="price">Price</option>
			<option value="completion">Completion Time</option>
			<option value="progress">Progress</option>
			<option value="features">Feature List</option>				
		</select>								
		<br><br>
		If you have any other querys or questions enter them into the text area below.<br>
		<textarea rows="5" cols="50" name="extra_comment"></textarea><br>
		<input type="submit" style="height:20px;" name="report" size="10" value="Request Report">	
	</form>

Link to comment
https://forums.phpfreaks.com/topic/124879-solved-multiple-select-options/
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.