[php] trying to find users between selection of age?

Mit Chauhan

New member
JAI MATADI all ..

i m trying to find the users by the selection of age in which the user first select age FROM and TO.. and then he/she will be come to know the users between that .. but m facing a problem writing QRY to this .. here is my code ..

----------------------------------------------------------------------------
<form name="form1" method="post">
Select the Age :
<br /><br />

<select name="from">
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>

</select>

<select name="to">
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
</select>

<br /><br />
<input type="submit" name="submit" value="Seach Users" />

</form>

<?php

if(isset($_POST["submit"]))
{
$from = $_POST["from"];
$to = $_POST["to"];
mysql_connect("localhost","root","");
mysql_select_db("alldatabase");
$qry = "select * from signup where age="
}
?>
------------------------------------------------------------------------

i dont know what next to do to write in QRY .. please help me out php experts what to do noww ..

thanks ..
----------------------------------------------------------------------------
 
Back
Top