I am currently designing an internal web application for my company and i am trying to navigate to a different page once the select value in the dropdown list has changed.
I have managed to populate this using MySQL but all i need now is when a user changes the dropdown list i need it to chage to a different page.
Hope this makes sense, here is the code i have currently wrote
<?php
$database="time_diary";
mysql_connect ("localhost", "myusername", "mypass");
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT userid, user_name FROM tuser";
$result = mysql_query ($query);
echo "<select name=category value=''></option>";
// printing the list box select command
while($nt=mysql_fetch_array($result)){//Array or records stored in $nt
echo "<option value=$nt[userid]>$nt[user_name]</option>";
/* Option values are added by looping through the array */
}
echo "</select>";// Closing of list box
?>
Thanks,
Baxter111

New Topic/Question
Reply



MultiQuote






|