I require a couple of scripts (PHP) to achieve the following:
1. create a new table in an existing MySQL database (if it does not exist already)that will be used to collect email and username info for a newsletter subscribtion.
2. A small "register for our newsletter" form with the following requirements:
a. Allow the user to subscribe to the mailing list by filling in the username and email address field.
b. Insert the above info into the database (as per item 1)
c. allow the user to unsubscribe by checking a box on the same form
c. Error check the submission to ensure that the user / email are valid and not duplicate entries (unless it is for the removal from the mailing list)and provide feedback
d. pop up a "Thank you for registering" or "You have been removed from the mailing list" message upon successfull insertion/removal from the database
The script should utalize an existing database connection and the form should be in the form of an include that can be put into an existing php page - I don't want the user redirected.
I can brovide a sandbox for development.