Hi there I have this Problem my code is like this:
<form name="form1" method="post"action=<? $PHP_SELF ?>>
<p>Busqueda:
<input type="text" name="buscar" >
<select name="select">
<?
//prints my array in option
for($j=0;$j<5;$j++)
{
echo"<option>";
echo$i[$j][0];
echo$i[$j][1];
echo"</option>";
}
?>
</select>
<input type="submit" name="submit" value="Buscar">
</p>
</form>
How can I print the value I selected I mean I want to print $i[$j][0].
I know that the name of the select is the variable that is send to the script, but I don't want that because this script will be used in an insert values query, I show the person all the values, for example it migth be a movie database in which each actor has it's own name and id you can remenber the name but not the code, now when you insert the name of the actor, a query LIKE shows you all the actors that have that common name once you select from a select the id of the actor will be stored in the table that relates the actor with the movie. I hope you understand me.
Thanx in advance.