<html>
<head>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function view(ss)
{
if(ss.options[ss.selectedIndex].value!="none")
{
window.location="http://jesus.freehyperspace2.com/desc.php";
}
}
-->
</script>
</head>
<body>
<form method="get" target="frameright" action="http://jesus.freehyperspace2.com/desc.php">
<?php
$hostname="localhost";
$username="jesus_jesus";
$password="jesus";
$dbid="jesus_jesus";
$link=mysql_connect($hostname,$username,$password);
mysql_select_db($dbid) or die("unable to connect");
$result=mysql_query("select * from career");
if($result)
{
print "<select name='IndustryType' language='javascript' onChange='view(this);' size='15' tyle='width:250px'>";
print "<option value='none' selected>Choose Industry Type</option>";
while($myrow = mysql_fetch_array($result))
{
print "<option value='$myrow[0]'>$myrow[1]</option>";
}  
print "</select>";
}
?>
</form>
</body>
</html>

in this code when i click on select box the selcted value should pass to another php page.i.e want to receve the selected value in desc.php

Let me guess, you always get the value = "none". if so, you should change the value property to whatever you want to pass to the next page. also check you view() function to see if it works correctly ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.