View Full Version : Could I do this?
Could I make a homework personal system where I could post homework and c/w assignments and I could write when it's due and what the homework requires me to do. If the homework assignments one day before it's due date, could I make it like priority - Make it red or put it to the top of the list via PHP? If so, any tuts I can follow?
Apolva
23-07-2010, 06:40 PM
Learn PHP and sure.
I don't get what you mean though, is it just to keep track of your homework or others'?
Irrorate
23-07-2010, 07:25 PM
Always follow the phrase "anything its possible". It's not a case of can you do it, its a case of do you know how?
You'd need (probably) these:
1. Insert statement to insert into PHP the required information (due date, task, etc).
2. Select statement to view the tasks you've already set.
3. Cron job (probably) to compare today's date with the dates in the database (this'll run once a day). You can then run #2 (select statement) and order by date descending to see which one needs to be due first... feel free to run some highlighting or whatever.
Trinity
23-07-2010, 08:12 PM
Always follow the phrase "anything its possible". It's not a case of can you do it, its a case of do you know how?
You'd need (probably) these:
1. Insert statement to insert into PHP the required information (due date, task, etc).
2. Select statement to view the tasks you've already set.
3. Cron job (probably) to compare today's date with the dates in the database (this'll run once a day). You can then run #2 (select statement) and order by date descending to see which one needs to be due first... feel free to run some highlighting or whatever.
I don't understand why you'd need a cron job for this.
The way I'd do it would be to select the tasks, ordered by date, compare the dates as they're being echoed, if it's a match, highlight it.
It's very basic PHP, so if you learn a bit of PHP, you won't need any tuts to do this :)
Eight.
23-07-2010, 08:46 PM
Learn PHP and sure.
I don't get what you mean though, is it just to keep track of your homework or others'?
Sorry. I didn't make it clear. keep track of my homework.
I'd do it using a database,
with the structure
id - date set - date due - subject - title - details - done
Then make a form where you can insert all of that
make a display page which queries
a) whether the homework is done yet (if done=0)
b) when its due
you can then display due homeworks in date order and use if statements to format them
You also need a way to update the homeworks, just like a simple form where you can submit completed homeworks or something
Irrorate
23-07-2010, 11:05 PM
I don't understand why you'd need a cron job for this.
The way I'd do it would be to select the tasks, ordered by date, compare the dates as they're being echoed, if it's a match, highlight it.
It's very basic PHP, so if you learn a bit of PHP, you won't need any tuts to do this :)
Ahh, good point. I was wayyy over-complicating things. This method sounds perfect ^^
MasterTB
25-07-2010, 12:40 PM
Tbh, this sounds really useful. I'll create one if you want?
Want to hide these adverts? Register an account for free!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.