I'm trying to pass php select option value to another page through url.but it's not working.please help me.
member.php
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("nordfxlk_member")or die(mysql_error());
$result = mysql_query("SELECT id,ugroup FROM ugroups");
?>
<select name='group' id='group' >
<?php
while ($line = mysql_fetch_array($result)) {
echo '<option value=' . $line['ugroup'] . '>' . $line['ugroup'] . '</option>';
}?>
</select>
<a href="db_sql/add_group.php?ugroup=<?php echo $line['ugroup'] ;?>"> click</a>
add_group.php
include('../limoconfig.php');
if(!isset($_SESSION['adminuserid']) )
{
header('Location:../index.php');
}
else
{
$ugroup = $_GET['ugroup'];
/*$id = $_GET['id'];*/
$acc_status = "update users set ugroup='".$ugroup."' where id=1931";
echo $acc_status;
$rate = db::getInstance()->exec($acc_status);
header('Location:../test.php');
}
}