Jump to content

c172captain

Members
  • Posts

    6
  • Joined

  • Last visited

c172captain's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. This website is made for gaming as a "clan" or group of people that play Flight Simulator. I am looking for suggestions and opinions on how the website could be improved. Every thing including was made by hand except for the image slider and current flight board. Thanks for your input! http://www.northeastvirtual.com
  2. I currently have all of this data sorted in a mySQL db (information about airline schedules: like departure and arrival airport). I have a form where the user can narrow down the results by filling out a simple form as seen below. I run the values taken from this form and run it into a my sql SELECT query. SELECT * FROM timetable WHERE depicao = '$depicao' AND arricao= '$arricao'" and the form is: <form action="http://www.northeastvirtual.com/center/result.php" method="post" name="timetable"> <select name="depicao"> <option value="*" id="">Any</option> <option value="KBOS" id="KBOS" name="KBOS">Boston</option> </select> <select name="arricao"> <option value="*" id="">Any</option> <option value="KBGR" id="KBGR">KBGR</option> </select> <input type="submit" value="Search" /> </form> As you can see one of the options in the select field is empty. What value would I use to select any data (The current value of value=" " returns no results). Please help!!
  3. Ok, I think I understand what your getting at. Would this work: if (!isset ($_POST['dep']) {"SELECT * FROM timetable WHERE $arr = 'arr' AND $flightnum = 'flightnum' "}; Would I have to make possible combinations for every possibility like arr blank but dep and flight num entered etc? EDIT: I just thought of an alternate way to do this, what if I used <select> fields in the form and made an option ANY what would I make the value of that option to select all rows for that particular column.
  4. That title might be a bit confusing but hopefully this clears it up. I currently have a timetable on my website that takes data from a mysql table and puts it into a simple HTML table on my website. Now to make it more user friendly, I wanted to add in a search box so the user can search for certain things like all flights leaving Boston. Even more in depth, I also have fields for arrival cities and flight numbers. This equates to something like this... SELECT * FROM timetable WHERE $dep = ['dep'] AND $arr = ['arr'] AND $flighnum = ['flightnum'] Now my question is how can i make a variable like $dep a neutral value but keep all the other fields intact. So for example, a user plugs in they want all flights arriving in New York but they don't care what the departure airport or flight number is so they leave it blank in the search form. In other terms, is there a value that can be made as an option in a drop down box that selects all of one column in a mySQL column?
×
×
  • Create New...