0

hi
im using combobox and retriving values in it from database , now what i wan is to get the selected value of combobox and send it in my php function....im unable to do this
need your help

thanx

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by SKANK!!!!!
0

hi
im using combobox and retriving values in it from database , now what i wan is to get the selected value of combobox and send it in my php function....im unable to do this
need your help

thanx

show your code.

0

For you to achieve this you have to add another option to your combo box.

For example:

$sql = 'YOUR QUERY HERE';
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result)){
          echo "<select>";
          echo "<option value='$row[item]'>$row[item]</option></select>\n";
}

Edited by deleted1234: n/a

0

if u want to get a specific value from mysql database u can use mysql_result();

$this = mysql_query("SELECT columname FROM tablename WHERE anycolumname = '$variable'");
$columnnamevalue = mysql_result($this, 0);

the 0 gets the first result i think if there are more than one result than 2 will get the third result.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.