Hi,
I have scoured the net and can't find an answer so I wondered if you guys can help.
I have a combo box that selects data from a database, I can then add the selection of the combo box and other fields to another table, however when I do this with php the page refreshes and the value of the combo box changes back to the default order (where I want it to show the option I just added to the database)
I have tried the below code, theoretically I thought it might work but it doesn't (the leadProductCategory is the combo box selection that I add to the database - it is set in the php file where I add to the database).
$selectLeadProductCatQuery = "SELECT * FROM category where userid = '".$_SESSION['userid']."' ORDER BY .'".$_SESSION['leadProductCategory']."';
$selectLeadProductCatResult = mysql_query($selectLeadProductCatQuery) or die(mysql_error());
while($row1LeadProductCat=mysql_fetch_array($selectLeadProductCatResult))
{
echo '<option value="'.$row1LeadProductCat['catname'].'">'.$row1LeadProductCat['catname'].'</option>';
}