View Full Version : How do I make a website database type thing (lots of questions)

30 pr. Lemonade
06-07-2007, 01:23 AM
Hello everybody, I'm new to these forums...and I'm not that good with web site. I know basic HTML, but for the most part I'm a graphics guy. But I have a website to build and I figure im going to need your help. Okay here's my website to build:

I need a website where visitors will come. They will see a big page with some forms on it (name, color, score1 (number), score2 (number)). They will fill these fields in and then click the finish button and score1, and score2 will be averaged to find score3. Score3 will be stored according to the name and color. Then a different person at another time can type in that same name and enter their own scores, their score3 is averaged with the other score3's that have been entered. Later someone can come back and search the name, and find average of every score entered.

Some questions:

1) What will I need to have on my hosting plan to do this (MySQL, php, .etc?)

2) What could I do to ensure their is no cheating (entering a score over a million times to bump up the average)?

3) What type of hacking vulnerabilities and such will I have to look out for?

4) uh..how do I do this (important one :P)


06-07-2007, 02:04 AM
You'll need a webhost that allows PHP and MySQL.
Then, you can find pre-made PHP/MySQL scripts that
control user membership, where they register, check their
email for confirmation. This will eliminate spamming robots,
but not human-hired spammers (not much you can do about
that), but you can screen all members before you let them
enter scores. That means, they may have to wait a day or
two until you authorize them.

Then a different PHP/MySQL script for the actual score
processing. You might have to hire someone to do all of this
programming ... it's a little advanced for beginners.

30 pr. Lemonade
06-07-2007, 02:40 AM
Oh I don't want membership. I want it to be anonymous one time thing. And for the actually programming, do you have any resources or books or something you'd suggest me?

06-07-2007, 12:57 PM
If it's anonymous there's no real way to prevent cheating. If someone know what they are doing they can get around any method.

Having said that you're basically reduced to two options: storing IP addresses and not accepting votes from the same IP address ever again (or within a specified time frame) or dropping a cookie whenever anyone votes, and not accepting votes if you find that cookie on their computer in the future.

The IP address method is poor because many different users often share the same IP, and most users have dynamic IP addresses anyway.

The cookie method is a little better, though users can block/clear their cookies easily enough if they know what they are doing.

06-23-2007, 04:25 AM
As for the cheating, you could put a limit on the score number. Say a max realistic score is 200. So, you'd block all over 200. Example in PHP (forgive me if it's wrong, I'm a little rusty)

if ($avg_score < 201) {
// tell it to do things as far as storing the average score
} else {
if ($avg_score > 200) {
//tell it to NOT store, and print an error message, telling user score is too large