Page 1 of 1

Online Form Application help needed

Posted: Fri Jun 12, 2009 8:32 pm
by Garimella
Hi everyone, i work as a student web support assistant at my university.
I was asked to develop an online form application with following functionality.

1). Online form to be used by freshmen, the form basically considers fields where in students will enter the courses that they plan to take for the remaining four years and the corresponding credit hours. I plan to design this form in dreamweaer cs4 using spry etc.

2). When the student clicks submit, I need to make sure that the sum total of credits is greater than 78. If yes, I need to send the form to the student's advisor's email id. Is it possible to convert the form data into a ms word doc and then send it to the advisors email id. Can this be achieved in PHP?. If so how, I have zero knowledge about php or scripting languages, but i am sure i can learn. i am looking for some one to give me some direction regarding this project.


Thanks
Pradeep

Re: Online Form Application help needed

Posted: Sat Jun 13, 2009 12:19 am
by omniuni
First, be careful of using Dreamweaver. You are indeed going to need some PHP, so most of the form will likely need to be generated by PHP as needed, and Dreamweaver can throw in a lot of extra code that will make things a pain.

I'd go for an approach like this.


====================
Enter your first course in the blank provided.
Click "Add" to enter another course.
When your hours total above 78, a Send button will appear
allowing you to submit your plan.
---
Your entered courses:
Engineering 101 - (4hrs)
Java Programming - (4hrs)
Discrete Math - (3hrs)
Course Name: _Calculus_____ Hours: ______
Current total: 11hrs. [+ Add Course]
===================

As for the PHP, when the user lands on the page, start a SESSION for them. As they submit a course, register it to a new position in an array, and store that into the SESSION. When the page loads, loop through the array to display added courses, and with each one add up the hours. You can, once they total 78, supply a "mail" button.

For now, do yourself a favor and settle for including the stuff as plain text in a mail. There is no simple way to make it magically into a word document, and even creating a .txt and sending it as an attachment is not exactly simple, although there are some open source mail classes that you could try that would simplify it.

Does that help you get started?

(To begin with PHP, try http://tizag.com)

Re: Online Form Application help needed

Posted: Sat Jun 13, 2009 1:18 am
by Garimella
hi, thanks for the reply. I have started developing the html form(just the form), and yes i am using dreamweaver,
and yes it is generating junk code, but do i have an option apart from dreamweaver, because I am not so good with html to code the form by myself.

Well, I can always tell my employers that a word format is not possible, but when the form is submitted, i need to send it to the professor, and there should be a mechanism for the professors to review the form and correct it before printing the form and putting it on the file.

Sad thing is, I just started learning php yesterday, i got the basic idea of HTML,CSS&JavaScript. I have a good two months for this project, but from where i stand now , it would be quite an accomplishment if i can pull this of :-)

Re: Online Form Application help needed

Posted: Sat Jun 13, 2009 1:20 am
by Garimella
by junk code in dreamweaver, i meant just a lot of unneccesary code

Re: Online Form Application help needed

Posted: Sat Jun 13, 2009 5:24 am
by omniuni
It's not really that Dreamweaver can NOT be used, but because of the dynamic nature of that page, it will end up being almost necessary that the code you create for it will be heavy with PHP, which, of course, will not display in DW. Can you give us either a link to a copy of the form, or a copy of the code for the form?