0

i need to know how to get the selected value from a drop down box in php
for example :
while($row=mysql_fetch_array($query))
{
echo"<option value='category'>".$row["cat_name"]."</option>";

}

i want in another page to get the selected value and perform some operation on it

3
Contributors
3
Replies
4
Views
9 Years
Discussion Span
Last Post by ramseswar
0

i need to know how to get the selected value from a drop down box in php
for example :
while($row=mysql_fetch_array($query))
{
echo"<option value='category'>".$row["cat_name"]."</option>";

}

i want in another page to get the selected value and perform some operation on it

you just call it by the name of the from element with the $_POST or $_GET array like so:

echo $_GET['selectname'];
//or
echo $_POST['selectname'];
0

try this in this way :

$hunt="SELECT dukja FROM anything WHERE id=$gngr";
$pols=$mysqli->qyery(query);
while($row=$pols->fetch_object())
{
$liger=$row->dukja;
?>"<option value='category'>"<?php echo $liger ?>"</option>"<?php;
}

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.