Page 1 of 2
Looking for a solution - php noob.
Posted: Mon Sep 27, 2004 4:09 pm
by kemph
I am new to the world of php and wanted to give you my scenario and see if anyone could shed some light on how I should go about it.
An organization wants me to create an online application where a user comes in, registers, and fills out a quick application. THEN after they complete the application they will need to select a time slot to interview during a set time slot given.
I do not know how to go about the time slot scenario...
Again, new to php so if you have any urls or how-tos dealing with something like this I would greatly appreciate it!
Thanks,
K
Posted: Mon Sep 27, 2004 4:14 pm
by feyd
I'd bet hotscripts has something that does similar things you could modify..
Posted: Mon Sep 27, 2004 4:15 pm
by Joe
I don't think you can just look for a code, you will have to learn the language first before going any further. Not only will you require knowledge on PHP but you will need some general database programming knowledge aswell.
Posted: Mon Sep 27, 2004 4:18 pm
by kemph
Joe wrote:I don't think you can just look for a code, you will have to learn the language first before going any further. Not only will you require knowledge on PHP but you will need some general database programming knowledge aswell.
I have coded in PHP and I have connected using MySQL. I understand the code, I just am not sure how to go about this particular project.
Posted: Mon Sep 27, 2004 4:25 pm
by feyd
break it into pieces and do the individual pieces.. each piece is a class or function, generally..
Posted: Mon Sep 27, 2004 4:40 pm
by Joe
Well I think for a project such as this all you would really need to know is how to insert data into the database. By this I mean "POST" all of the html elements into the mysql db after the user submits from the html application form. Most of the work would be in html/xhtml/css or whatever you decide to use.
Posted: Mon Sep 27, 2004 4:45 pm
by kemph
Joe wrote:Well I think for a project such as this all you would really need to know is how to insert data into the database. By this I mean "POST" all of the html elements into the mysql db after the user submits from the html application form. Most of the work would be in html/xhtml/css or whatever you decide to use.
Yes, I have planned to simply have a form to post all the information into the db, but I cannot figure out how to set up on the db for the interviews.
I have thought that on the db create a field for each time slot available and then display each field on the page and if they try to select a field that has already been taken (or value = 1) then ask them to select again. I just dont know how to go about building this... any suggestions?
Posted: Mon Sep 27, 2004 4:56 pm
by Joe
As for the planning you should sit with a pen and paper and think about it. My recommendation would be a structure like:
|_
| firstname
|_
| lastname
|_
| address
|_
| postcode
|_
| phonenumber
|_
| dateofinterview
If the user enters a time which has already been taken or whatever you will have to work a bit with php.

Posted: Mon Sep 27, 2004 5:05 pm
by kemph
Joe wrote:
If the user enters a time which has already been taken or whatever you will have to work a bit with php.
Here's my problem, again. I haven't jumped into enough php to know how to do this.
Posted: Mon Sep 27, 2004 5:08 pm
by Joe
Well the best advice I can give you kemph is to either learn more php or hire a programmer if you need it asap.
Posted: Mon Sep 27, 2004 5:09 pm
by feyd
I'd suggest not allowing them to actually enter the time themselves.. instead have buttons or table cells that are clickable for the time slots you have available.. all other used or blocked slots wouldn't be clickable.
Posted: Mon Sep 27, 2004 5:11 pm
by Joe
feyd wrote:I'd suggest not allowing them to actually enter the time themselves.. instead have buttons or table cells that are clickable for the time slots you have available.. all other used or blocked slots wouldn't be clickable.
That would take alot of time for a newcomer though!.
Posted: Mon Sep 27, 2004 5:13 pm
by feyd
not really... you know the time alotments, you can easily build an interval to know how many slots to create, what times to block out for lunch or whatever..
just need to take it in small steps.. play with the time functions in the database, or php's.. if you need to dynamically create these time slot windows.. otherwise, you can just hard code the slot locations.. then just need a database table to know if an time x is already taken to not have it clickable.
Posted: Mon Sep 27, 2004 5:18 pm
by Joe
Yeah and you can use classy calendars so the user knows times and days by using:
Untested
Just thought I should mention

Posted: Mon Sep 27, 2004 5:18 pm
by feyd
I wouldn't use the calender command line
