Forum Moderators: coopster
I am new to PHP and MySql, but understand the basics and concepts (or so I think). I want to build a simple signup sheet (well, ok, after the way I described it below it might be a lot more complex- but I know it is not to difficult, because I see these singup pages all around the Net) to gain access to the Membership areas. In order for the interested person to gain access they must refer '3' friends (with email, first and last name as required input), than they create there username & pass and account info. This is what I would like to setup in the following order ON A ONE PAGE SIGNUP with 2 forms (probably working one with another):
1.) Contains 3 areas for referral info (email, first, last name)- customer MUST refer at least 3 friends (form shows 3 data entry for referral info; a total of 9 entry boxes). [Email must be validated, along with name input- cannot be left blank].
2.) Info that customer enters will be saved in MySQL database table "makeupname" (or table ‘Referral’, which has 3 fields: ‘username’, ‘first’, and ‘last’).
--Before email is sent to referral or database it (email address) must first be checked if it already exists in database, if NOT it must be validated to see if it is in correct format.
---if it Does exist, give error message (PHP)stating so ("email address has already been used") and asking them to use another.
----Also if possible, is there a script that can check to see if email address exist, by verifying that the email can be sent without a bounce message or other errors? Any recommendations.
3.) Customer can Write a Note for his/her friends or we can send in a automatic reply such as: THIS IS THE MESSAGE THAT WILL BE SENT TO YOUR FRIEND “Dear $first $last, your friend $yourname has requested that you visit….” (get name from bottom of form –where customer makes puts his account info- using variable or by having customer input there name and email address for the first time at the top above the 3 referrals info.”
4.) If email address is not already in database and is Pronounced Valid, than it can be sent. Email should be sent as though if coming from $yourname email address. Send email AFTER customer has added account info and pressed submit button.
----Once email has been sent successfully [ After Step 5/6 ] it is than ADDED to the database under username of customer who referred him (this is done afterward to prevent problems if customer accidentally pressed submit button with incorrect data).
5.) Here customer sees other form, ON SAME PAGE and adds his account info.
I already have this page working well, but I will need help adding that code in together with the above code.
--- In this form section customer creates Member ID, pass, first, last, mailing info, phone, fax, email. “all info beside fax is required” and verified accordingly.
----This info is verified against database “for Member ID”, and gives the necessary errors if any. If no errors are found than all information is Saved into database under “Member” table.
----- At the end of this bit of script is another PHP Mail() that sends an email to the New account owner thanking them, welcoming them, and giving them there “username” and “pass” to store in a safe place.
6.) SUBMIT Button is pressed.
7.) Directed to Thank you page where they are given access to Members Area.
Thanks again, any hints, tips, code, advice etc., will be very much appreciated. Have a good one.
Sincerely,
djtwo
Read up on some of these topics; they will give you a good understanding of how this should be accomplished. Also, a lot of information can be found at [php.net....] There are also tons of tutorials online on this subject. If you still need help with this, feel free to respond back in this thread. Good luck!