Jump to content

[SOLVED] insert from an drop-down list


ionnnnutz

Recommended Posts

<form id="form1" name="form1" method="get" action="<? echo $PHP_SELF; ?> ">
			<select name="select">
				<?php


				$list=mysql_query("select * from domenii_comp");


				while($row_list=mysql_fetch_assoc($list)){
				?>
				<option value="<? echo $row_list['id']; ?>" 
							   <? if($row_list['comp_domeniu']==$select){ echo "selected"; } ?>>
							   <? echo $row_list['domeniu']; ?></option>
				<?php

				}
				?>
			</select>
               <input type="submit" name="Submit" value="adauga!" class="sbtn"/>
		</form>


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.