Fee for a job.

Express the business side of your digital lives. Share your experiences and/or your comments regarding a business or organization.

No advertising.

Moderator: General Moderators

Post Reply
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Fee for a job.

Post 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.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post 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?
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post 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. :-D 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.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post 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..
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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..
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post 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. :-D ) but I also recognize this companys supposed web development team has no idea how to do this... :-D 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.
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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.
Charles256
DevNet Resident
Posts: 1375
Joined: Fri Sep 16, 2005 9:06 pm

Post 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
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post 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', '....');
?>
Post Reply