Simple web contact form

user profile photouser profile photouser profile photo2388 developers have joined this project.

What you will practice

Using procedural or Object Orientated PHP and very basic HTML form elements, create a contact form which will submit content to display on the next page.

Introduction

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.

Requirements

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

Extra challenge:

  • 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.

Suggested Implementation

Either

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.

References

  • This project requires very few resources that are all freely available and easy to set up.
  • For anyone wishing to brush up on their design skills, you can use CSS to change the look/feel of the form.
  • For those who use or are wanting to understand Bootstrap, you can use the library for the elements you need.
  • To encourage good practice:
    • Validate the input in the email field to ensure it's an email format
    • Make fields required - ensure feedback is given to the user if an input is missing.

Hit a programming wall?
Get help from our mentors

  • Post request free
  • First 15 mins free

Suggested languages and frameworks

HTML/CSSPHP

Difficulty

easy

Contributed by

Owner/Developer @ LostFables.com with 6+ years of project management experience.

Interested in this project?

Shorten your learning curve with on-demand programming help

The awesome set of verified mentors will provide guidance and mentoring help when you are stuck.

Suresh Atta

  • Post request free
  • First 15 mins free
Shorten your learning curve with on-demand programming help

Browse more projects

More coming soon...