Jump to content

c172captain

Members
  • Content Count

    6
  • Joined

  • Last visited

Community Reputation

0 Neutral

About c172captain

  • Rank
    Newbie
  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?
  5. This is a PHP question using mysql queries. And no code yet!
  6. So here is my situation, I have all these rows in a table and I want to have the user be able to select which rows are shown. In my case, the user should be able to take a timetable and narrow it down, for example by default it would display all departure airports but a user fills out a form and uses a drop down to select a specific airport. Also this form has multiple fields like arrival city and flight number so how would I create a value that selects all arrival airports/flight numbers. Let me know if I need to explain it further.
×
×
  • Create New...