Could anybody help me with the following problem. I am trying to pass a value from a selectbox to a url which refreshes the page. I am having a problem passing the value. The code is set out as follows:
if(!isset($skill))
{
<table cellspacing='0' cellpadding='3' width='90%' border='0'>
<form method=post action=access.php?page=trainers/trainer_browse&skill=$skill>
<tr><td><p>Please choose a training skill from the list below</p></td></tr>
<tr><td>
<select name='skill' value='skill' type='text'>";
$skills = mysql_query("select * from db_trainings");
while ($result = mysql_fetch_array($skills))
{
$skill_name=$result['training_name'];
echo "<option>$skill_name</option>";
}
echo "</td></tr><tr><td><input value='GO' type='submit'>
</td></tr></table>
</form><br>";
}
When the button is clicked the URL is executed but the $skill value is not being passed on. If anybody can help with this problem or suggest an alternative approach please let me know.
if(!isset($skill))
{
<table cellspacing='0' cellpadding='3' width='90%' border='0'>
<form method=post action=access.php?page=trainers/trainer_browse&skill=$skill>
<tr><td><p>Please choose a training skill from the list below</p></td></tr>
<tr><td>
<select name='skill' value='skill' type='text'>";
$skills = mysql_query("select * from db_trainings");
while ($result = mysql_fetch_array($skills))
{
$skill_name=$result['training_name'];
echo "<option>$skill_name</option>";
}
echo "</td></tr><tr><td><input value='GO' type='submit'>
</td></tr></table>
</form><br>";
}
When the button is clicked the URL is executed but the $skill value is not being passed on. If anybody can help with this problem or suggest an alternative approach please let me know.