web question, excel php , javascipt

S

smk17

I'm not even sure what to put in the Subject for this.

Here is what I'm doing and what I need to know

I've made a website about high school basketball in New York State. One
thing I want to put on the site are the scores from each of the games
and I'd like to somehow get the scores up ASAP. There are many games
basically every night of the week. With around 70 teams in my
particular section. One way to do it would be to "hire" a
representative from each school (a player, coach, fan, parent, etc.) to
volunteer to send me the scores from his/her game through email. This
might work but it would require a lot of work on my part reading each
email and posting the scores manually. Or I could look at all the
online newspapers and post those scores to my site. But I want the
scores up even quicker than that. And I'm sure there would be times
where I wouldn't find articles on all the games. Yes, I may be crazy.

So I thought maybe there would be a way where this volunteer could go
to a password protected web site, fill out a form or something that is
specific to his/her school, with the score, date, teams, etc. and that
would automatically update that section of my website that has all the
scores on it. I wouldn't have to do anything.... :)

Or maybe they send me an Excel sheet after every game and my scores
page is "hooked" to that excel sheet and just by updating the Excel
sheet to the server, the scores in the web page are updated. I know a
guy from another section does it this way, but he has one Excel sheet
with all the scores from it. This excel sheet comes from a guy who runs
a clearing house at his home where all the coaches call him after their
games. They leave their message on the machine, he listens to the
message, and he puts all the scores into this one excel sheet, sends it
to the webmaster from that section, and vwalla, the scores are there.
He said it was all done with javascript or php, maybe both.

section4hoops.com

I am not familiar with writing javascript or php, but have downloaded
many scripts and used them correctly.What I do not know is how the
connection is made between the Excel sheet and my webpage.

Can anyone point me in the right direction or maybe you have another
solution I hadn't thought about.

Thanks
Steve
 
V

VK

smk17 said:
I am not familiar with writing javascript or php, but have downloaded
many scripts and used them correctly.What I do not know is how the
connection is made between the Excel sheet and my webpage.

Can anyone point me in the right direction or maybe you have another
solution I hadn't thought about.

Viewing/manipulating an Excel sheet in browser in the majority of cases
presumes a Windows user with both Microsoft Office (Small Business or
Business edition) and Internet Explorer installed. If it's fine by you,
search at http://msdn.microsoft.com by keywords "JScript ActiveX". An
ActiveX sample in the JScript reference is based exactly on Excel
sheets usage.

microsoft.public.scripting.jscript is another place to ask for ActiveX
programming help (please do not take as a "go away" hint! It's just a
not-so-useless place to mention).
 
S

smk17

Thanks for the advice. In the short time since I posted this I think
what I need to learn how to do is set up some type of content managent
application using Mysql and php, staying away from Excel. These users
that will be giving me the scores may not know Excel or html, etc, so
if they can simply go to a webpage, fill out a form with the score of
the game, hit submit, that gets sent to the database and it's
automatically updated on the "Scores" page of my website.

I think that's what I need to do, and learn how to do, I have no clue
right now.
 
V

VK

smk17 said:
Thanks for the advice. In the short time since I posted this I think
what I need to learn how to do is set up some type of content managent
application using Mysql and php, staying away from Excel. These users
that will be giving me the scores may not know Excel or html, etc, so
if they can simply go to a webpage, fill out a form with the score of
the game, hit submit, that gets sent to the database and it's
automatically updated on the "Scores" page of my website.

I think that's what I need to do, and learn how to do, I have no clue
right now.

Well, it is not really about client-side scripting. You may use
JavaScript to say validate form input before submitting (do not
hesitate to ask here).

In general get yourselve first a web-hosting with MySQL support (they
are going by the price of doughnuts now). Then a page quering your
database (front-end display) and updating your database (your form).
That should be some password protection for the form also. Depending
on your hosting type (Unix / Windows) you may write it using either PHP
or ASP. That should be an ocean of free basic solutions. Google for it,
ask at <comp.lang.php> or <microsoft.public.inetserver.asp.general>
 
S

smk17

Thanks very much for your help.


Well, it is not really about client-side scripting. You may use
JavaScript to say validate form input before submitting (do not
hesitate to ask here).

In general get yourselve first a web-hosting with MySQL support (they
are going by the price of doughnuts now). Then a page quering your
database (front-end display) and updating your database (your form).
That should be some password protection for the form also. Depending
on your hosting type (Unix / Windows) you may write it using either PHP
or ASP. That should be an ocean of free basic solutions. Google for it,
ask at <comp.lang.php> or <microsoft.public.inetserver.asp.general>
 
J

Jake Barnes

VK said:
Well, it is not really about client-side scripting. You may use
JavaScript to say validate form input before submitting (do not
hesitate to ask here).

In general get yourselve first a web-hosting with MySQL support (they
are going by the price of doughnuts now). Then a page quering your
database (front-end display) and updating your database (your form).
That should be some password protection for the form also. Depending
on your hosting type (Unix / Windows) you may write it using either PHP
or ASP. That should be an ocean of free basic solutions. Google for it,
ask at <comp.lang.php> or <microsoft.public.inetserver.asp.general>

I don't think it's necessary to resort to the use of MySql. That might
be a little much for someone without much technical experience. A
simpler approach would be a simple form that takes that data and pings
a PHP or Ruby or Python script to output an RSS feed. The RSS feed
could then be rendered as a webpage using any number of simple, free
scripts (and some browsers, such as Safari, render RSS rather well,
with no need for help from a script).

I should think finding a free PHP script that can take some input and
output an RSS feed must be fairly easy. There are tons of such scripts
out there.
 
J

Jake Barnes

smk17 said:
I'm not even sure what to put in the Subject for this.

Here is what I'm doing and what I need to know

I've made a website about high school basketball in New York State. One
thing I want to put on the site are the scores from each of the games
and I'd like to somehow get the scores up ASAP. There are many games
basically every night of the week. With around 70 teams in my
particular section. One way to do it would be to "hire" a
representative from each school (a player, coach, fan, parent, etc.) to
volunteer to send me the scores from his/her game through email. This
might work but it would require a lot of work on my part reading each
email and posting the scores manually. Or I could look at all the
online newspapers and post those scores to my site. But I want the
scores up even quicker than that. And I'm sure there would be times
where I wouldn't find articles on all the games. Yes, I may be crazy.

So I thought maybe there would be a way where this volunteer could go
to a password protected web site, fill out a form or something that is
specific to his/her school, with the score, date, teams, etc. and that
would automatically update that section of my website that has all the
scores on it. I wouldn't have to do anything.... :)

First, check to see if any of the local papers in your region offer an
RSS feed with all sports scores in it. If so, then your task is as
simple as grabbing any one of these scripts:

http://www.hotscripts.com/PHP/Scripts_and_Programs/XML_and_PHP/

and setting it up on a site, and plugging in the newspapers sports RSS
feed.

If the local papers don't offer all sports scores, then you'll need a
simple form to allow you or your volunteers to input data and create
that RSS feed. You'd want to use create a simple HTML form, allowing
team names, dates, locations, and final scores. Perhaps you could use
the RSS category tag to specify the sport. Something like RSS Writer
would make it relatively easy to write the script.
http://usefulinc.com/rss/rsswriter/
 
S

smk17

Thanks Jake,

This sounds like what I need. Creating my own RSS feed. I checked two
of my local papers and they do have sports RSS feeds. But it seems as
if I'd get every sport headline they send out. I only want the scores
from boys basketball. I don't even want the article about the game.
But I'll keep looking into that.

So let me see if I understand all this.

I'd create a form, web page, where the volunteers can go, hopefully
password protected? They fill out the form with the teams names, the
score, the date, etc. and submit it.

That automatically gets sent to the specific page on my site for the
scores and it's posted. Do I need to create a form page for every
volunteer, or will one form work even though people from different
towns could possibly be filling out that form at the same time?

Is there any way I can format the results to be displayed in a table,
or do I have control over how that looks? I'd like to separate these
scores by each conference, there are 5 in my area.

I know how to create the form, but connecting it to feed into that
"scores" page is where I get lost. Is the link you gave me
(http://usefulinc.com/rss/rsswriter/) intended to show me how to do all
that? I really appreciate your help.
 
J

Jake Barnes

smk17 said:
This sounds like what I need. Creating my own RSS feed. I checked two
of my local papers and they do have sports RSS feeds. But it seems as
if I'd get every sport headline they send out. I only want the scores
from boys basketball. I don't even want the article about the game.
But I'll keep looking into that.

Well, you could take their feed and then filter out the stuff you don't
want. You don't need to include the articles if you don't want to. They
may offer easy ways to filter by sport. For instance, they may use the
RSS tag "category" to specify which sport each article refers to. You
could elect to only show those items that have a category of
"basketball". Could you share the link for the RSS feeds? If I saw the
feed I might be able to help imagine some filtering strategies.



So let me see if I understand all this.
I'd create a form, web page, where the volunteers can go, hopefully
password protected? They fill out the form with the teams names, the
score, the date, etc. and submit it.

Well, if the local newspapers have all this info in their RSS feeds,
then you don't need to recreate the data, you just need to find a way
to filter out the data you don't want. But if the local papers aren't
providing the information you want, then yes, this is the way to go.



That automatically gets sent to the specific page on my site for the
scores and it's posted. Do I need to create a form page for every
volunteer, or will one form work even though people from different
towns could possibly be filling out that form at the same time?

A simple arrangement would involve a total of 4 files on your website:

1. the form where people put in the scores

2. the PHP script that turns the scores into an RSS feed

3. the RSS feed

4. a page that renders the RSS feed and makes it look pretty


For the different towns, or conferences, I suggest that just be field
in the form. That is, as people fill out the form, they specify what
town or conference they are from.


Is there any way I can format the results to be displayed in a table,
or do I have control over how that looks? I'd like to separate these
scores by each conference, there are 5 in my area.

With enough effort, all things are possible. You could, with very
little effort, grab a free script and accept its default formatting for
rendering your information. With more effort, you could make the output
look like anything you want. There are even some interesting Javascript
scripts that would allow you to put the info in an interactive table
that could be sorted by various columns, live, allowing people to
interact with the information on the page.


I know how to create the form, but connecting it to feed into that
"scores" page is where I get lost. Is the link you gave me
(http://usefulinc.com/rss/rsswriter/) intended to show me how to do all
that? I really appreciate your help.

I think RssWriter could help, but its not a whole solution. You need a
form that collects info like this:

1st team
2nd team
location
date
final score

etc. You can add in what information you'd like to keep track of. The
HTML of such a form would look like this:

<form method="post" action="makeRss.php">
<p>1st team: <input type="text" name="input[firstTeam]" /></p>
<p>2nd team: <input type="text" name="input[secondTeam]" /></p>
<p>Location: <input type="text" name="input[location]" /></p>
<p>Date: <input type="text" name="input[date]" /></p>
<p>final score: <input type="text" name="input[finalScore]" /></p>
<p><input type="submit" value="Add game to page" /></p>
</form>

You see the part at top that says action="makeRss.php"? That means
you'll want to have a file called makeRss.php, and inside of that file
should be a PHP script that does the magic of turning your form into
data.

If RSS is too hard to get, you could probably get by with your own
formatting rules, such as separating each field with a comma and each
record with a newline. Such a PHP script would be trivial.

You may also want to break up the date into its parts:

1st team
2nd team
location
day
month
year
final score

and you may want to break up the scores:

1st team
2nd team
location
day
month
year
1st team score
2nd team score

The more you break it up, the more people have freedom of sorting the
data, splicing it up as they like.
 
S

smk17

Jake said:
smk17 said:
This sounds like what I need. Creating my own RSS feed. I checked two
of my local papers and they do have sports RSS feeds. But it seems as
if I'd get every sport headline they send out. I only want the scores
from boys basketball. I don't even want the article about the game.
But I'll keep looking into that.

Well, you could take their feed and then filter out the stuff you don't
want. You don't need to include the articles if you don't want to. They
may offer easy ways to filter by sport. For instance, they may use the
RSS tag "category" to specify which sport each article refers to. You
could elect to only show those items that have a category of
"basketball". Could you share the link for the RSS feeds? If I saw the
feed I might be able to help imagine some filtering strategies.



So let me see if I understand all this.
I'd create a form, web page, where the volunteers can go, hopefully
password protected? They fill out the form with the teams names, the
score, the date, etc. and submit it.

Well, if the local newspapers have all this info in their RSS feeds,
then you don't need to recreate the data, you just need to find a way
to filter out the data you don't want. But if the local papers aren't
providing the information you want, then yes, this is the way to go.



That automatically gets sent to the specific page on my site for the
scores and it's posted. Do I need to create a form page for every
volunteer, or will one form work even though people from different
towns could possibly be filling out that form at the same time?

A simple arrangement would involve a total of 4 files on your website:

1. the form where people put in the scores

2. the PHP script that turns the scores into an RSS feed

3. the RSS feed

4. a page that renders the RSS feed and makes it look pretty


For the different towns, or conferences, I suggest that just be field
in the form. That is, as people fill out the form, they specify what
town or conference they are from.


Is there any way I can format the results to be displayed in a table,
or do I have control over how that looks? I'd like to separate these
scores by each conference, there are 5 in my area.

With enough effort, all things are possible. You could, with very
little effort, grab a free script and accept its default formatting for
rendering your information. With more effort, you could make the output
look like anything you want. There are even some interesting Javascript
scripts that would allow you to put the info in an interactive table
that could be sorted by various columns, live, allowing people to
interact with the information on the page.


I know how to create the form, but connecting it to feed into that
"scores" page is where I get lost. Is the link you gave me
(http://usefulinc.com/rss/rsswriter/) intended to show me how to do all
that? I really appreciate your help.

I think RssWriter could help, but its not a whole solution. You need a
form that collects info like this:

1st team
2nd team
location
date
final score

etc. You can add in what information you'd like to keep track of. The
HTML of such a form would look like this:

<form method="post" action="makeRss.php">
<p>1st team: <input type="text" name="input[firstTeam]" /></p>
<p>2nd team: <input type="text" name="input[secondTeam]" /></p>
<p>Location: <input type="text" name="input[location]" /></p>
<p>Date: <input type="text" name="input[date]" /></p>
<p>final score: <input type="text" name="input[finalScore]" /></p>
<p><input type="submit" value="Add game to page" /></p>
</form>

You see the part at top that says action="makeRss.php"? That means
you'll want to have a file called makeRss.php, and inside of that file
should be a PHP script that does the magic of turning your form into
data.

If RSS is too hard to get, you could probably get by with your own
formatting rules, such as separating each field with a comma and each
record with a newline. Such a PHP script would be trivial.

You may also want to break up the date into its parts:

1st team
2nd team
location
day
month
year
final score

and you may want to break up the scores:

1st team
2nd team
location
day
month
year
1st team score
2nd team score

The more you break it up, the more people have freedom of sorting the
data, splicing it up as they like.

Wow, Thanks for the time it took to write this, I appreciate it.

However I came up with another solution that seems to be working good
so far. I created a blog where I will sign up the 60-70 users to have
access to log in and report the scores. The blog has an RSS feed and I
found a script (rss2html.php) that turns that into a web page. I tested
it and it seems to be working great.

Here is the web page with the scores: section4hoops.com/rss_scores.php
Here's the feed URL:
http://www.d1006281.dotsterhost.com/applications/wordpress/?feed=rss2

The only thing I'm not 100% happy with is, after a few weeks of games,
this web page is going to be very long! I'm trying to figure out if I
can categorize this feed in any way. Right now, the scores just pour in
as they come in.

But first I have to get those 60-70 volunteers. Again, thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top