Jump to content

bdrever

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by bdrever

  1. Thanks for the help I got it figured out!
  2. I need some tips for how to display search results.Querying the database is not the issue I just have no idea how to display the results.I want to display the results in a table, 3 columns of 4 rows, so 12 results per page. I don't know how to do this. Would I make some sort of nested loop?Also, if I have more than 12 results I want to spread them over multiple pages. This I also have no clue how to do.I welcome any and all suggestions.Thanks guys!
  3. thanks for pointing me in the right direction. I really did not know where to begin
  4. Thanks for the heads up!I've managed to create a form that will populate the second dropdown list, based on the user input of the first, but only AFTER the submit button has been pressed. How can I make it do it upon changing the information in the first box?I thought of using the javascript onChange event handler but I am not sure how to pass the value from js into php which I need to do in order to query my db..Any ideas? I was dreaming about this lastnight and thought I had a solution but I doesn't work.<?php$brand = $_POST['CarMfg'];$query = "SELECT mfg, model FROM test.cars WHERE mfg = '$brand'";$result = mysql_query($query);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Untitled Document</title></head><body><form name ="test" method="post" action="ListTest.php">phone : <select name="CarMfg" onchange="update()"> <option value="" selected><?php print $brand; ?></option> <option value ="Ford">Ford</option> <option value ="Dodge">Dodge</option> <option value ="GMC">GMC</option> </select><br> <br>model: <select name"model"><?php while ($row = mysql_fetch_assoc($result)) { print '<option value="'; print $row['model']; print '">'; print $row['model']; print '</option>'; }?></select><br><br><input type="submit" value="submit"></form></body></html>
  5. Hi guys,I would like to create a form that pulls data from a database and displays the values it pulls as elements in a select style dropdown list. Any tips on how to do this?Example:The first dropdown box the user selects a type of food: PizzaThe next dropdown box automatically fills with different kinds of pizza i.e pepperoni, cheese, etc..
×
×
  • Create New...