Anybody know a way that I could do some data validation???
Here's the problem...
Pages are using php connected to a mysql db.
There is a drop down list box that will list Track and Field events (ex. 100 Meter Dash, Long Jump, 4x100m Relay, etc). The list box is populated from the database, because each meet can have different events.
Track and Field events are of specific type (Track, Field or Relay) this will help in the data validation and I use this in another place as well, in the site.
Question... Once a coach selects a specific event (we'll say the Long Jump) from the list box, is there any way that I can figure out what event is selected. Here's what I want to do in pseudocode...
Find selection by coach
Connect to db and find type of event
If type "track" then
do data validation for track event
If Incorect
Prompt User
Else
Accept Input
End If
End If
If type "relay" then
do data validation for relay event
If Incorect
Prompt User
Else
Accept Input
End If
End If
If type "field" then
do data validation for field event
If Incorect
Prompt User
Else
Accept Input
End If
End if
All entries would be of type string or varchar (depending how you look at it) You can't put it the inputs as of type Int because you may have to put times like 2:05.44 for the 800m this won't work because of the : and you can't use it for field events either because the format needs to be feet-inch.nearest quarter inch (22-11.75, for example)
Anybody have any suggestions?????