Hi,
I'm having a problem trying to get my html form drop down menu to reference its options from my mini database which is a .dat file.
I've got my script reading between keywords I've set in my database, and it can print all the text between those keywords. ie. print $dates;
But the problem is when I try to use this information in the function that contains my html form:
<select name=\"Date selection\">
<option value=\"0\">SELECT A DATE</option>
<option value=\"$dates[1]\">$dates[1]</option>
<option value=\"$dates[2]\">$dates[2]</option>
</select>
Doing the above gives me the first letter of the text. So if the word I want to display is Thursday then this what I get: $dates[1] is T, $dates[2] is H...and so on.
Can someone please tell me how I can put each line from my dat file into each option of my drop down menu? The important thing to note is that I have other text in this file that I don't want to display for this, hence the keywords.
BTW, I don't have access to a real database yet, that's why I'm trying to use this dat file.
Any help would be appreciated