Hey there...I'm having a little problem.
What I need to do is take the underscores out of a file name and make then into spaces so that when displayed in a web page or drop down list the underscores are not visible.
The data in the database has spaces but the file names do not.
So when I extract the data and use it in a likn to the file I need to get rid of the spaces.
I have two pieces of code here.
One that will change the spaces to underscore (javascript):
<% FNamecheck=FName
Dim answer
answer = " "
FName = ""
FNamelength = len(FNamecheck)
for x = 1 to FNamelength
temp = mid(FNamecheck, x, 1)
temporary = StrComp(temp,answer)
if temporary <> 0 then
FName = FName&temp
else
FName = Fname & "_"
end if
next %>
...and another that will take the data from the database and makes an html link from it(PHP):
$result = mysql_query("SELECT DISTINCT fieldname from tablename", $db);
print '<select name=somename>';
while ($myrow=mysql_fetch_array($result)) {
printf('<option value="%s.htm">%s', $myrow["SONG_TITLE"], $myrow["SONG_TITLE"]);
}
print '</select>;
I'm wodering how can I combine the two to accomplish what I need to do.
Any help will be VERY much appreciated.
Jaymz