Inspired by the Simple Web Contact Form project from the CodeMentor platform.
A form often needs to be used to pass data to various other applications. In many cases, it could be a database, in others, it may be to give a specific answer or a quote. Regardless of how the information may need to be used, it is an important skill to be able to move data to new pages so it can be manipulated for use in further code. For this project, you will create a HTML web form.
The form should consist of:
- A text input for user’s name
- A text input for user’s email address
- A drop down to select user’s issue (Query, Feedback, Complaint, Other)
- A text area for user’s comment
- The form will post to a second page which will display the information in an easy to read format.
- There are more optional conditions to add challenge and/or better functionality to your form below
- Make the text area a WYSIWYG. (Use Summernote or CKEditor for example).
- Add an edit button to the second page, send the data back to the form, and autofill the data back into the fields.
- If you would like to practice more with databases, add a submit button on the second page which will save the response to a database table.
Either
- Local web server such as XAMPP or WAMP
Or
- Web hosting
Also
- Basic knowledge of HTML/CSS to create forms
- Basic PHP knowledge of using variables and POST content.
As we are working with PHP which is a server-side language, we require the use of either a local web server (Free) or a web hosting package (Low cost) in order for us to run the code.
The majority of the functionality will be passed with PHP. HTML will allow us to create the form and the webpage structure while the CSS will give us the ability to style the HTML.