Jump to content

[SOLVED] Select form and PHP


Minase

Recommended Posts

hy there i do have a HTML select form

			<form action="123.php" method="POST">				
			<select name="test" size="1" class="input">
								<option value="1">10 minutes</option>
								<option value="2">20 minutes</option>
								<option value="3">30 minutes</option>
								<option value="4">40 minutes</option>
								<option value="5">50 minutes</option>
								<option value="6">60 minutes</option>
							</select>
							<input type="submit" class="input" value="send">

							</form>

in table users i have defined the used time

all users have in total 60 minutes of fighting

in that column (lets say i define it in variable $a)

if $a = 1 the form to display  just the first 5 options from 1-5,excluding the 6 one

if $a = 2 from 1-4 display only and so on.

i can do this with if statement ,but i want an loop thing,not lots of IF.

thanks

Link to comment
https://forums.phpfreaks.com/topic/118074-solved-select-form-and-php/
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.