Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mattmiller90210

macrumors newbie
Original poster
i am making a service hour tracking website for my school, but i am not sure how i should go about doing it. i need to let teachers be able to enter in service hours and students to be able to check their hours. this should be password protected. i want the teachers to be able to send the information from a program on their computers.

if you have any suggestions or ideas for creating a database like this please help!
 
First of all, you need to obtain a server in order to run any web service. You can either subscribe to a hosting company or build your own if your school has the facility. The easiest way with the most online help you can get is to use php as the scripting language and MySQL as the database, both running off apache. (LAMP for short). Btw what is your programming background?
 
i can easily obtain a server-- i have no experience in either php or MySQL. how would i be able to use these two together to make this database work? any advice is helpful
 
Little run down for you, if you can get a server then do yourself the favor and either install a nix setup where php/apache/mysql all come pre-configured and read (just about anywhere) how to lock down the extra services you won't need. From their your going to need some programming, which is way out of the scope of a thread.

(above can also be done on a win box, but you will need to d/l the packages seperately)

Interesting side note, this was on slashdot today, supposed to be super easy for anyone with little experience:http://developers.slashdot.org/article.pl?sid=05/01/21/1514234&tid=156

Little friendly advice, I'd get some help, nothing worse then a sql injection attack on a db content based website, since proper techniques probably won't be in place since your new.
 
I put together something similar for my lab. I had no experience either, but php/mysql is a good way to go. There are a lot of tutorials on the web and many things to read on the subject. You can also find good security tips on php.net.

On a side note, it appears to be harder to do sql injection attacks now. I was testing my inventory against them and found that escape characters were already being added even though I wasn't calling addslashes(). Is this normal of php now, or just a debian thing? Typically some simple well-programmed filters and user differentiation within your database will help you a good bit against amateurs. Just be sure to stay up to date. Nothing worse than wannabe-crackers who know where to find script exploits.

Jim
 
EodLabs said:
install a nix setup where php/apache/mysql all come pre-configured
sorry for asking but what is a nix setup?

EodLabs said:
From their your going to need some programming, which is way out of the scope of a thread.
where can i turn to in order to be able to program this?

EodLabs said:
(above can also be done on a win box, but you will need to d/l the packages seperately)
what is a win box and what packages are you talking about?



i appreciate your help but i am so new to all of this that i don't really understand the majority of what you said 😱
 
A nix box is a way of saying a computer running a UNIX or UNIX-alike OS, such as (but not exclusively) OSX, FreeBSD, OpenBSD, or Linux. Win box is a computer running Windows. The packages he is referring to would be PHP, MySQL and Apache.

Where you can start learning the php language depends on the level of programming/scripting experience you have. If you have never done any sort of scripting I would suggest getting a book. As I haven't used books for my work, someone more knowledgeable here could probably suggest a good one. If you are fairly comfortable in your skills for learning a new programming language, you can get an overview of functions and code examples at the PHP website. I think the site may suggest good books.

MySQL is a decent database backend that works well with php. I assume you are not going for enterprise class data manipulation, so it will probably suit you fine. Again if you have no clue about what I am talking about, you will probably need to find a book and start reading (Again I am no help in the book department). The MySQL website also has great information for doing administration tasks and forming queries. I will warn you that SQL syntax seems very strange to a beginner, and it is very sensitive to the types of characters that you use (' vs. `).

The learning curve is tremendous for a beginner to do web enabled database work. It took me a while to hammer out a page that does simple queries and formats them. Don't get frustrated and give up! The knowledge and experience could be well worth it for you, and you get the great satisfaction of creating something from less than scratch. 🙂

When you get the books, do not gloss over the security sections. It is much easier to design a secure database from the ground up than going back and doing it later (personal experience).
 
I mentioned security just because in this fun season of auditors it's all I heard about. But anyway, to clear some things Jim didn't touch on, here's how I would go about doing this.

This is a 3 part question really.

What OS am I running ? You have different options depending on what OS you choose. I mean If it's a Unix varient then you can use Ruby,Java server pages, PHP (recommended), PERL, etc... as your web scripting language (although perl just parses and output's pages, not really a web scripting language). On the flip side, you could be using a windows server, in which case you can be using ASP, ASP.NET (Which is very easy, point and click database connection and data pulling, wizards, etc...) and others again such as php, perl, Java server pages etc...

What Webserver am I using ? If you are in the windows market chances are you'll be using IIS since it comes preloaded in most systems (Server and desktop). You could also go with with others like apache, which can run different modules like JBOSS for Jsp pages, etc... On Unix, i'd stick with apache, anything else could be trivial for a new user not used to the idea of config files and services that don't have fun GUI tools (allthough appache has a billion).

What Database am I going to interface with? This is another big question, as you need to think out how your tables are layed out. If you make a design that doens't follow the normal rules (or atleast 1,2,3 and Boyce Codd if your feeling adventures) then your asking for redundancy problems later (2 records that you have no idea which is the real, relavant date) as well as expansion problems (doing 10 thousand updates on a table instead of switching the foreign key record to reflect the new changes) If you have no idea what i'm talking about, it's not hard but a something you have to relize. Anyways, on that note, you have options as well in DB's, postgrl, mysql, if you have academic licenses MS SQL Server (recommended for ease of use), access if you hate your life hahah, etc.... I like Mysql the best, but it has it's issues, and they are documented.

Now How would I As a newbie go about this ? Despite this forums general tag-lines, I would use ASP.NET as you could purchase a 30 dollar asp.net in 24 hours crash courses for idiots and the blind and come up with something fast. As well though You could pick up a very good php/mysql starter book, I had one years ago can't remember the name off the top of my head. Just glance through to make sure they go over table creation, idea's to stick with, I mean it won't be any college level DB class, but just the basics for a basic program.

Cheers for beers

Eodlabs
 
Just as an aside to Eod's post. If you decide to use asp, I would recommend using apache with mod_asp (completely free speech and beer). It will give you at least a modicum of security over IIS. I'm assuming you are doing this for a school, which no doubt has many many L33T H4X0R wannabes. Best to keep them guessing.

Good suggestion with the Keys. Always use at least primary key (individual distinct numbering of a dataset) in a database. You can set a field in sql to do this automatically with each record. I messed myself up in my first test design just not knowing. The reasons for this are not immediately obvious until you have multiple entries with repeat data. Say you have one class with John Bob in it, and another class with him also (or two different John Bob's in the same class). Which one should the database select to work with? That's where keys help immensely.

Jim
 
thank you for all of the advice, i wish i had time to learn php and mysql-- they seem very helpful. unfortunately, school is way too much work to start learning a new language (or two) besides spanish 😀

do you think i would be able to use file maker pro in order to store the data, while making an application for the teachers to enter the data?

i want teachers to be able to enter the data without opening their internet browser- does anybody know enough about file maker pro to know if i can do this?

thanks again for all the help
 
Well I don't know jack about MySQL, PHP, or apache... but I plan on building a database driven site myself.

If you have OS X, you have apache. It is built in. PHP is a free download, as is MySQL. So technically for testing and building purposes your Mac is a server.

I plan on downloading an open source content management system like mambo to control the content. I don't think you technically HAVE to know MySQL/PHP inside and out is all I'm saying.

A forum like this, for example, could be built 100% and for free with very little backend knowledge.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.