I need a registration/download system for a small website that will do the following:
1. Visitor comes in on the site and clicks a link to download a document or a link to go to a protected page.
2. At this point the visitor is presented with a login consisting of just an email address field.
3. After entering the email user email is verified against mysql database and if already registered, the user is redirected to their destination. The action is recorded in the database.
4. If visitor info does not exist the user is presented with a simple registration form where their email is prefilled.
After completing the form the user is logged in, action recored and redirected to their destination. At the same time their registration info is posted (http post once) to another site behind the scenes.
5. Also I should be able to send a visitor directly into a custom registration form (from email) specifying the destination location (hidden value). I should be able to have multiple of these registration forms..
After filling out the form, the same checks should apply as before. If user email exists then just send to destination and record action, if not then enter all the data into db, do http post then send to destination.
The destination pages or documents would not be available for direct access/download.