Forum Moderators: open
First of all I run an informational site for the local music scene in my local area.
Currently I am using an IFrame to load in the shows (concert info) that are coming up. People email me the information through a form I have set up or through regular email.
My problem is that when people send me the show information I need to manually edit the pages with HTML. I know that there has to be an easier way to update the shows on this page with alternating colors for each listing, highlighting in yellow the text that I have between "(text....)", etc.
I manually edit with Dreamweaver.
I am currently using CSS for the alternating rows but is there something else I can do instead of manually editing the shows page the way I am currently doing it all the time?
Sometimes I get 10 to 20 emails with tons of show information that I need to add. Its not that I mind doing work, but I would like to get something more streamlined so I can focus on other aspects of the site.
Thanks again and hopefully this all makes sense:)
Mark
<Sorry, no personal URLs. See TOS [webmasterworld.com]>
[edited by: tedster at 3:29 am (utc) on Jan. 5, 2005]
If you don't know a programming language and are starting fresh, PHP is a good choice because it's easier to learn. I prefer perl. Javascript is not going to help you.
.shtml is mostly used as a page that includes a file, you'll still have to edit what gets included. It may very well be you'll want to combine the two.
The way I'd approach this is to write a script that stores your data in a plain text (flat file) or mysql database, then formats your data automatically and outputs a fresh page or a file to be included, either way. If you store the data, it's there to edit next time you update.
The alternating colors dealy is also easy - if you understand programming, you go through a "loop" and on each iteration, swap the color. This is the general structure:
$dark = 'DarkBackground';
$light='LightBackground';
@records = (1,2,3,4);
print "<table>\n";
## The for loop goes through the list: $i = 1,2,3, etc. For
## example, the third time through $records[$i] is 3.
## if the background's dark, make it light. Otherwise,
## make it dark.
for $i (0..$#records) {
if ($bg eq $dark) { $bg = $light; }
else { $bg = $dark; }
print qq¦<tr><td class="$bg">$records[$i]</td></tr>\n¦;
}
print "</table>";
This would produce
<table>
<tr><td class="DarkBackground">1</td></tr>
<tr><td class="LightBackground">2</td></tr>
<tr><td class="DarkBackground">3</td></tr>
<tr><td class="LightBackground">4</td></tr>
</table>
Any light bulbs coming on? Hope so! :-)