What I want is for the 2nd set of options to change to whatever is available once a name is selected based on date=today and name=selectedname
also
Here is the basics of the table:
ID | name | location | Date
1 |John | place 1 | 03-07-2015
2 |Jane | place 2 | 03-07-2015
3 |John | place 2 | 04-07-2015
4 |Jane | place 2 | 04-07-2015
I am just not sure how to run the SQL statement
SELECT location
FROM table
WHERE name = "selected name"
AND date = CURDATE()
based on when Select "name" changes
Here is an example of my current code :
<form name="test" id="test">
<div>
<label for="name">Name:</label>
<select name="name" id="name" required>
<option value="" disabled selected>Please Select</option>
<option value="John">John</option>
<option value="Jane">Jane</option>
</select>
</div>
<div>
<label for="location">location:</label>
<select name="location" id="location" required>
<option value="" disabled selected>Please Select</option>
<option value="place 1">place 1</option>
<option value="place 2">place 2</option>
</select>
</div>
<div>
<label for="startend">Start or Finish:</label>
<select name="startend" id="startend" required>
<option value="" disabled selected>Please Select</option>
<option value="Start">Start</option>
<option value="End">Finish</option>
</select>
</div>
<div class="submit">
<input type="submit" name="submit" value="Submit" class="submit" />
</div>
</form>
so once John selects 'John' from name selection the location select box will only contain 'Place 1' if todays date is 03-07-2015 but if todays date was 04-07-2015 then it would only contain 'Place 2'