PDA

View Full Version : Make a searchquery with results of chained selects?



Hanno Derks
01-17-2008, 11:56 AM
Below is from dynamic selects .html

<table align="center"><tr>
<FORM METHOD="POST" name="zoekterm" ACTION="factsheet.php">
<td>Select a airliner:&nbsp;</td>

<td><select name="make" style="width:180px;"></select></td>
<td><select name="type" style="width:180px;"></select></td>
<td><select name="model" style="width:180px;"></select></td>
<td><input type="submit" class="button" name="submit" value="Fly"><input type="button" value="Reset" onclick="resetListGroup('vehicles')">
</tr></table>
</form>

I've added the submit button "Fly" for connection to factsheet.php. In factsheet the're search qeury's to a sql-database. factsheet.php is showing up without results. Probaly cause name="make" etc. I can't remove them, cause then there is nothing working at all.

Question: Is het possible to send a query with this script to a database?
Is there an easier way to do this?

codeexploiter
01-17-2008, 12:08 PM
Why there are no 'Options' in your listed 'Select' elements? Are you sure that your background PHP file gets the value for querying the database? As far as the HTML you've pasted the PHP file doesn't get any value using which it can query the database. Either you can provide a link to your site or provide the source code fully I mean the HTML as well as the PHP so that the troubleshooting can be done quickly.