Page 1 of 1
Fee for a job.
Posted: Sun Sep 18, 2005 7:10 pm
by Charles256
Here is the job. Make a page to accept registrations, perhaps one per person tha tis then stored in a database. Then after a certian time have a script randomly select someone from the database and pick a "winner" then e-mail that winner to a certian person in the company. Also only let that script be run once. When they register collect about ten fields of information including address, name, number, age, sex, birthday, the like...
I've been programming for about 1.5 years, all PHP, MySQL experience.
Thanks for the feedback.
Posted: Sun Sep 18, 2005 7:16 pm
by d3ad1ysp0rk
How well can you program? Are you going to do this in OOP or procedural programming? How well do you comment? Do they have a time frame for completion? Are you required to maintain this program after finishing it?
Posted: Sun Sep 18, 2005 7:23 pm
by Charles256
I'm fairly good. I'm not arrogant and say I can do everything but I've got to where I can do most things without referring to amillion different web sitse.

Procedural programming, and I even plan on putting all the code on two pages. (It's a small enough project I don't see much of a point in making a billion seperate pages) I comment well enough that someone that is of at least moderate skill could follow what is going on. And I don't see why it should need maintaning. I plan on testing good enough before releasing to them that it shouldn't need fixing, or so I'm thinking:-D And I plan on finishing it tonight.
Posted: Sun Sep 18, 2005 7:26 pm
by Charles256
though it did occur to me i'll need some sort of authentication system to make sure only an authorized person runs the winner script. which i suppose i could hard code onto the page since it only needs to be run once and noone has to sign up to be a user..
Posted: Sun Sep 18, 2005 7:39 pm
by timvw
I don't see why you would need a user to "click" or "activate" the pick-a-winner script as this seems a task that is can (and should) be automated.. simply install the task in your crontab.. And you don't have to depend on an employee to actually pick a winner
Basically:
- 1 page with a form (store posted data in a database)
- 1 script to pick a random winner
- 1 install pick-winner in crontab so it runs at requested times
This should be doable in under an hour.. If you want a bit of testing (perhaps write a couple of simpletest webtestcases) make that 2 hours..
Posted: Sun Sep 18, 2005 7:44 pm
by Charles256
um. care to PM me some links on how the devil to do a crontab?:-D and i'm also aware this can be done in two hours tops (specially since I'm watching T.V.

) but I also recognize this companys supposed web development team has no idea how to do this...

I'm even pondering letting them run the script straight from my site, I get the impression their site doesn't have MySQL or any other database system installed and that would cause some difficulty.
Posted: Sun Sep 18, 2005 7:50 pm
by timvw
um. care to PM me some links on how the devil to do a crontab?
Nay, search this forum or perform a websearch and you will find a load of links..
but I also recognize this companys supposed web development team has no idea how to do this... Very Happy I'm even pondering letting them run the script straight from my site, I get the impression their site doesn't have MySQL or any other database system installed and that would cause some difficulty.
In that case you may wonder why they need the user information, or how they are going to use it.. Because it seems pretty stupid to ask a user for data if you are not going to use that data
Anyway, i prefer to ask 2 * $50 instead of 10 * $10 but that's your own choice.
Posted: Sun Sep 18, 2005 7:53 pm
by Charles256
they're asking for user data, so when they select a winner we need to send them the go-kart and make sure they aer old enough to even be entering:-D
Posted: Sun Sep 18, 2005 8:08 pm
by timvw
In that case the following script should be sufficient
Code: Select all
<?php
mail('timvw@users.sourceforge.net', 'Congratulations you are the winner of our Go-Kart', '....');
?>