the URL I posted wasn't supposed to be a link but just an example of a unique URL and not a real one..
freecrm or anyone that knows - can you tell me how to create $session variables so that users cannot skip stages in a sign up process//
Ever grateful~
My registration process contains few pages.
PAGE 1: Registration Form
First page is imple form with usual stuff - Username, Password, E-mail address etc.
On submit, the same page enters these details into the back end database but enters a value under the access level as "Unvalidated". This means that they can login but do not have access to any functions (as access level needs to be something other than unvalidated).
It also commits the $_POST variables from the form into $_SESSION variables like this:
PHP:
if (isset($_POST['username'])) {
$_SESSION['username'] = stripslashes($_POST['username']);
}
if (isset($_POST['password1'])) {
$_SESSION['password'] = stripslashes($_POST['password1']);
}
etc. for each variable.
These details are now stored in session memory and cannot be accessed directly.
The same page then redirects to step 2 which eliminates spammers.
PAGE 2: E-mail verification
To make sure that the e-mail address is valid, this page takes values from the session variables and creates an e-mail showing certain values.
More importantly, it contains a link to a verification page
PHP:
www.freecrm.x10hosting.com/crmregistration/accountverify.php?memid='.$memid.'
$memid is a randomly generated, unique ID number that takes certain values to the verification page.
PAGE 3: Verification
This bit was a bit tricky to get my head round. You can't pass a password (or any personal data) in a URL (i.e. the link from the e-mail) so the 1st verification page needs to find (create recordset of) the initially inserted "unvalidated" record and check a password against it.
So, this page depends on what is in the URL and is just visually a form with one password field.
It takes the real password in the database and the password entered in the form and passes both into a session variable to page 4..
PAGE 4: Verification completion
Very simply checks real password with password in form field and if the two match, the record in the database updates with a user access level that can be used...
E-mail checked, Job done and no personal data shown!
Theres obviously quite a bit of code in here and I can't put it all in at once so let me know which bits you're interested in!