Question: HTML document with a PHP handler Create a html document with a form that registers all non-profit organizations in the area, the number of members

HTML document with a PHP handler

Create a html document with a form that registers all non-profit organizations in the area, the number of members they have, and the type of organization. After the user enters data in all the fields and presses the button, your program will create a single text le that saves information for each organization on a separate line. The name of the data file is np.txt. This data file should be created in the same directory as your running program, without hard-coding the file path to ensure portability.

In the data file please include the Organization name, Membership, and Type, separated by commas. Membership should only accept numbers, Type should only accept the following strings: Educational, Animal Rescue, Religious, Food Service, and misspellings should not be allowed. The first line of the output will be the headers. You can make up all the names and numbers while you are testing your programs.

Sample Output written to a file will look as following:

Organization, Membership, Type

Meals on Trucks, 123, Food Service

The Church of Purple Cross, 34, Religious

Kitties and Puppies, 1234, Animal Rescue

etc.

Edit: Form file named "np.html", and your handler file named "np.php"

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!