tags:

views:

26

answers:

1

Hi every body

i want to search between 2 list box like "from and to". plz help me

A: 

Do you mean get values from a database depending on the values of list boxes? Then it would look like

mysql_query(
    'SELECT *
    FROM mytable
    WHERE from_field = "'. mysql_real_escape_string($_POST['from_field']) .'"
    AND to_field = "'. mysql_real_escape_string($_POST['to_field']) .'"',
$conn);

Providing the to and from select boxes are called to_field and from_field respectively, and you called your mysql connection $conn.

Jonah Bron
No i've store date in database and now i want to search e.g. in "from" field select 18 and "to" field select 21. it's mean i search between 18 to 21 if available than show me their records.