my code stock.com

Snippet options

Download: Download snippet as view_newphp.php.
Copy snippet: For this you need a free my code stock.com account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

<label for="categooria_pro" class="control-label">Categoría</label>
<select id="categooria_pro" name="categooria_pro" class="form-control">
	<option value="">Seleccione</option>
	<?php while ($resCat = mysql_fetch_array($sqlCat)) { ?>
		<?php if (isset($resPro)){ ?>
			<?php if ($resCat['id'] == $resPro['categoria_id']) { ?>
				<option value="<?php echo $resCat['id'] ?>" selected="selected">
					<?php echo $resCat['nombre_categoria'] ?>
				</option>
			<?php }
		 } else { ?>
			<option value="<?php echo $resCat['id'] ?>">
				<?php echo $resCat['nombre_categoria'] ?>
			</option>
		<?php }
	 } ?>
</select>    

<label class="control-label" for="categooria_pro">Categoría</label>
<select id="categooria_pro" class="form-control" name="categooria_pro">
	<option value="">Seleccione</option>
	<option value="1">Ferreter�a</option>
	<option value="2">Jugueter�a</option>
</select>

//------------------------------------------------------------------------------------------------------------------------------------------------

<label for="categooria_pro" class="control-label">Categoría</label>
<select id="categooria_pro" name="categooria_pro" class="form-control">
	<option value="">Seleccione</option>
	<?php while ($resCat = mysql_fetch_array($sqlCat)) { ?>
		<?php if (isset($resPro)){ ?>
			<?php if ($resCat['id'] == $resPro['categoria_id']) { ?>
				<option value="<?php echo $resCat['id'] ?>" selected="selected">
					<?php echo $resCat['nombre_categoria'] ?>
				</option>
			<?php }
		 } else { ?>
			<option value="<?php echo $resCat['id'] ?>">
				<?php echo htmlentities($resCat['nombre_categoria']) ?>
			</option>
		<?php }
	 } ?>
</select>       

<label class="control-label" for="categooria_pro">Categoría</label>
<select id="categooria_pro" class="form-control" name="categooria_pro">
	<option value="">Seleccione</option>
	<option value="1"></option>
	<option value="2"></option>
</select>

Create a free my code stock.com account now.

my code stok.com is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.