Click to See Complete Forum and Search --> : Need help creating form used to easily update web content


Northwave305
10-27-2003, 02:26 PM
Ok, here is the situation:

We are a small radio station located in North Dakota, our site is located at http://www.kdix.com. I am acting as the webmaster and kind of learning as I go.

I am developing a sports page, and as you can see, we already have our schedules posted which are updated weekly for the next 2 weeks. I am wanting to add a page that shows the results from the local high school and college sporting events, but make it simple enough for the other guys in the building to update it themselves.

What I would like to do is make a page that is password protected. The user logs in, and comes to a page that has several different fields, for example:

Date: ____________
Event Line 1: ____________(ex. HS Cross Country)
Event Line 2: ____________(ex. City Invite)
Event Line 3: ____________(ex. Boys Division)
Event Line 4: ____________(ex. Top 5 Individual)
Event Line 5: ____________(ex. other info)
1st Place: ____________
2nd Place: ___________
3rd Place: ___________
4th Place: ___________
5th Place: ___________
6th Place: ___________
7th Place: ___________
8th Place: ___________
9th Place: ___________
10th Place: __________
Winning team rank: _______
Winning team: ________________
Winning team Score(s): ____ (___) (___)
Losing team rank: _______
Losing team: ______________
Losing team Score(s): ____ (___) (___)

Now, let's say we are going to input the results from the college football games from the day. "Date" would be filled in with the date of the event, "Event Line 1" would be filled in with "College Football", "Winning team rank" would have a value, "Winning team" would have a value, only the first field in "Winning team Score(s)" would have a value, and same for the losing team fields. (The other fields would be used for track meets, volleyball scores, etc.)

At the end of the page, there would be a submit button. I would then like the information that is entered to post to the scoreboards page, with the proper fonts, formatting and spacing. The null values would not show up, and the final product would look something like this:

1/1/03

College Football:
-------------------

(xx) Winning Team Name - xx
(xx) Losing Team Name - xx

To add more games, the user would go back to the form, and enter in the information for the remaining games, skipping the "Date" and "Event Line 1" fields. Then, when you hit submit, the next game would appear directly under the last entry.

And finally, we will keep the scores up for about a week. So, let's say we start on 1/1/03. We keep adding, adding, and finally 1/8/03 rolls around. I would then need a button on the forms page that will clear everything from the 1/1/03 line down to the 1/2/03 line. Then the next day, 1/2/03 to 1/3/03 would be deleted, and 1/9/03 added to the bottom.

I know it would be a lot easier to just make a basic table, and enter the information every day, but I need this to be as user friendly as possible. These people are computer illiterate, and don't even really know how to copy and paste. And I can't be updating this every day myself. Any suggestions would be greatly appreciated, and if someone could just point me in the direction of a website with info on how to do something like this, that would be great!

Kyle Thiel
kyle@kdix.net

PeOfEo
10-27-2003, 04:16 PM
You are going to need a server side language and a data base with 2 tables. One table would control the member names and passwords of the employees so they could add content. The other table would control the content. On the form you would connect to the data base with an insert sql statement to add the content to the data base. On a thrid page you would query the data base and get the content and display it in a data grid or something, a data grid is where the data from the data base if put into a table dynamically by the server. So therefor you do not actually write the html for any of these pages, you may right a little but that code and all of the scripts are rewritten with the data base content as html that the users browser reads. That is why it is possible for you to access and write in data bases and text files with a website.
Server side languages: ASP.NET ASP PHP CGI JEP
Data bases: with asp and asp.net:access mssql msde xml
with php and other unix technologies:mysql xml
oracle may also be used but it is expencive as heck. If your server is unix and they support php go with php, if they are windows based and support asp.net go with asp.net

Chevi54
10-27-2003, 09:15 PM
Hi, I have not used SSI or communicated with my server about CGIs so I may be talking through my hat. However why wouldn't Contribute (by Macromedia) work? Aside from the fact that you would of had to make your web site using Dreamweaver or Front Page.

PeOfEo
10-27-2003, 09:39 PM
you can use macromedia cold fusion because it is a server side technolgy but that is the only thing macromedia has that can do what you are looking for. cold fusion is relatively simple to use but is not very advanced, it can only do the basic stuff well. SSI isn't what you are looking for either. CGI can do what you want but I would reccomend php or asp depending on your server os, cgi bins can be accessed with php etc and php is a newer technology then cgi/perl. If you are on unix hunt for php, if you are on windows go with asp.net or asp.

Northwave305
10-28-2003, 04:01 PM
Thanks PeOfEo! I'm going to fool around with your suggestions and see if I can figure something out. I'll keep you updated. Anyone else who has any other ideas, feel free to share them.

PeOfEo
10-28-2003, 04:38 PM
No prob, good luck.

Northwave305
10-29-2003, 11:20 AM
Ok, I've figured out the login part. I downloaded ASP.NET Web Matrix, and used the web.config and Login Page templates. The login page automatically sends the person to default.aspx. Is there any way to change the tag so it points to a different page? If not, it's no big deal, I can just name the page where the user inputs the score updates default.aspx I guess.

I went through the tutorial for creating a text box with a button, which posts the information that you enter into the text box. That is exactly what I am looking for. However, I need the information to post to a different page, that is not password protected, that others can view without logging in. I guess with ASP.NET Web Matrix, it must post to itself, and not to another page. Are there any other programs out there similar to Web Matrix that use the regular ASP and not ASP.NET so that I can make the information post to a non password protected page? I'll be looking around and any suggestions would be greatly appreciated.

PeOfEo
10-29-2003, 01:06 PM
I prefer dreamweaver for any server side scripting. To change the page look for this
response.redirect("somepage.aspx") change the page insde, that is if this is vb of cource and not c#. Asp.net is better then asp classic, I would suggest not going with asp classic, look at the link in my profile, asp.net can be done with many languages and is object oriented. It also adapts fro mobile technologies, and the asp.net viewstate saves you a lot of config work. You can make non pass wrod protected pages with asp.net, my clans site is www.clanknights.vze.com its asp.net but you do not need a pass to see it... Just get rid of anything on the non protected pages that says
if len(session("memberid"))=0 then
responce.redirect("somepage")
end if
the memberid thing could be membername or any other thing, its whatever the identity feild of that data base is.

Northwave305
10-29-2003, 02:31 PM
Thanks. Now what about getting the data that is entered in TextBox1 to post to a new page called, for example scores.aspx, rather than posting to the same page, as shown in the tutorial?

Northwave305
10-29-2003, 02:54 PM
Really, it would just be a dumbed-down version of this forum. I type my message in here, and when I click on "Submit Reply," it posts my message for all to see. And notice how when I leave the "Post subject:" field blank, my message fills in the blank space when it posts. That's exactly what I need to do. Then, in the evening, the guys would log in, type in the results, hit submit, and it would post to the Scores page.

PeOfEo
10-29-2003, 09:10 PM
you cannot modify files or anything like that, but you can modify a data base. So you can insert the scores intoa data base and then have scores.aspx read from the scores feild in the data base. YOu can have one page display all data from the data base, just have a data grid and when you have a link use something called a query string which is that ?something=something in the url, well anyways say select this from the data base where feildid = query string basically.

Northwave305
10-30-2003, 09:40 AM
I found a guestbook script to modify, and that works great. I think for the track and cross country scores where we list the top 5 or 10 places, we will just list them like this:

Top 5 Individuals:
1. asdf, 2. adlkgj, 3. slkadjf, etc.

Then, someday when I can really sit down and learn the ins and outs of this, I can set it up the way I have imagined. Thanks again for your help, and hopefully I'll have it up by the end of today!

Northwave305
10-30-2003, 06:14 PM
Well, here it is, nothing spectacular, but it gets the job done, and is very easy to use.

http://www.kdix.com/viewscoreboard.aspx

The employee logs into the scoreboard.aspx page, enters the teams and the score, and it posts to the viewscorboard.aspx page when they click submit.

There are still some features that I would like to add. I want the user to be able to click on a button that will delete the entry from the previous week. For example, let's say that we started inputing scores from this evening, Thurs 10/30/2003. We only want to keep the scores on for about a week. So when Fri 11/7/2003 comes around, the user would click on a button that would delete Thurs 10/30/2003, leaving us with scores from Fri 10/31/2003 to Fri 11/7/2003.

Also, I would like to keep the most recent scores at the top. So it would start with 11/7/2003 at the top of the page, and would list the scores in decending date order. Right now, every thing appends to the last item that you have put in.

PeOfEo
10-30-2003, 11:04 PM
if it is by auto number it should be in date order anyway, but just make the date feild its own feild and put instead of
order by id desc
put order by date desc