1
I need that when the user clicks on the button "SEARCH/CONFIRM" open a new window in the browser asking for SELECT one of the categories that comes directly from the database, and when selecting the same window closes and the chosen value goes pro field and it would only be possible to change the category by clicking the button "CLEAR THE FIELD" and doing the whole process again.
It’s all through javascript, but unfortunately I don’t have that knowledge.
Input and buttons: (Default input is disabled):
<div class="input_field"><label for="num"><b>Categoria</b> :</label>
<input type="text" disabled="disabled" name="categoria" size="65"><br>
<div style="margin-left:105px;"><a class="busca"><font color='#FFFFFF'>Buscar/Confirmar</font></a>
<a class="voltar"> <font color='#FFFFFF'>Limpar o Campo</font></a></div><br>
</div>
Categories.php (New window)
<table width="100%">
<thead>
<tr>
<th><center><font class="cinza_peq">Selecione</font></center></th>
<th><center><font class="cinza_peq">ID</font></center></th>
<th><center><font class="cinza_peq">Nome da Categoria</font></center></th>
</tr>
</thead>
<?php
$sql_pai = "SELECT * FROM cms_news_cat ORDER BY ID";
$res_pai = mysql_query($sql_pai) or die(mysql_error());
while($row=mysql_fetch_array($res_pai)){ ?>
<td><center><input type="radio" value="<?php echo $row['nome']; ?>" /></center></td>
<td><center><?php echo $row['id']; ?></center></td>
<td><center><?php echo $row['title']; ?> <u></u> </center></td>
</tr>
<?php } ?>
<tr>
</tbody>
</table>
Thanks buddy, it worked perfectly!
– user89739