I have a form field that is processed by CGI and I want to incorporate a check of the form field that makes sure that there is only these file extensions in the field along with a web address like so:
1. User inputs OR
2. CGI checks to make sure that only web addresses with mp3 or MP3 or WMA or wma are input. If you entered anything other than those four extensions in the we address of the field, the ERROR routine is invoked.
Is there a good place on the web to get some help on this? I have the majority of the code done, but I do not know how to get the final steps done. Below is my code so far:
OWA::error("You must use the extensions of .mp3, .MP3, .wma or .WMA in your URL tag!"
if $form{'music_url'} =<HERE IS WHERE I AM STUMPED>;
1. User inputs OR
2. CGI checks to make sure that only web addresses with mp3 or MP3 or WMA or wma are input. If you entered anything other than those four extensions in the we address of the field, the ERROR routine is invoked.
Is there a good place on the web to get some help on this? I have the majority of the code done, but I do not know how to get the final steps done. Below is my code so far:
OWA::error("You must use the extensions of .mp3, .MP3, .wma or .WMA in your URL tag!"