Php Assignment

Order Description

Write a PHP script with which new members of an omnisport association can register with the association. After the data has been entered and the send button has been clicked, the input must be checked for correctness. If a given error has been entered or not, this must be reported and the possibility of improving the data must be provided.

If the data is correct, they must be added to the database. The new member will then receive an e-mail confirming the registration and the members administration of the association (you in this case) will receive an e-mail containing the registration. This mail must consist of the name of the member (composed of first name, inserts and last name), the member number that has been assigned (in the database) and the sports section for which registration has been made.


The entered data is stored in the tables "members" and "membership" in the database "dbLOI".

The "members" table consists of the following data:


First name (20 characters, NOT NULL)

Inserts (15 characters)

Last name (30 characters, NOT NULL)

Street (50 characters)

House number (10 characters)

Postal code (6 characters)

Residence (30 characters)

E-mail (50 characters)

Date of birth (DATE)

Sex (1 character (M / F))


The "membership" table consists of the following data:



Date input (DATE, NOT NULL)

Data end (DATE)

Sports component (30 characters, NOT NULL)

Lesson day (15 characters)




Actually, a table "lessons" should be added in which all possible lessons from the omnisports club are included. The unique ID of this table should then be included in the "membership" table, instead of the sports component and teaching day fields. However, you do not have to do anything with this command and you must use the above tables.

The tables above have been drawn up according to the principle that one member can enter several memberships. In this assignment, however, you may assume that every application concerns a completely new member.



Your elaboration must meet the following conditions:

-Well-formed HTML structure.

-Give the program the title "Submission order 051R6".

-Provide a neat and clear layout.

-Provide a clear structure for storing the files on the server. Tip: Use subdirectories.

-Use different colors and at least one picture.

-The "sports part" field can only contain the values ​​tennis, football, table tennis and billiards. The user must select the sport via a selection field.

-The gender may only contain the values ​​"M" and "V". The user must select the correct one via a radio button.

-The lesson day can only contain values ​​from Monday to Friday. The user must select the course day via a selection field.

-Keep in mind that the insert can contain quotes, eg in 't Veld.

-Test the e-mail address for correctness (see also exercise assignment 19-1).

-Test whether all required database fields have been entered in the form and give a notification if this is not the case and give the user the possibility to restore the data.

-Use labels to indicate what needs to be entered in the fields to fill in.

-Ensure error handling if the connection to the server or the database can not be established.

-Create a central file containing the data for access to the database.

-Use your own error_handler (see also practice assignment 22-1).

-In addition to a send button, you must also have a "reset" button on the entry form to delete the completed, but not yet sent, data from the form.

-If the button for sending is used, the entered data must be put in the database, a confirmation email must be sent to the member and a mail sent to the members administration.

-If mailing goes wrong, it should not give an error message, only a notification to the user.

-The potential member must enter the date entry in the form itself.

-Use of Java (script) is prohibited.

-Make sure your code does not contain dependency as a result of which it does not work on another server.