Hello. i am sound gonna launch a new CB product, and i would like to know how to make a login/password system, where the new login and password is automatically generated on the "thank you" page. Also,i would like to know how to make someone who would try to access the member url without login in from the main page to be redicted to the main site's landing page. Thanks.
Yep.. you should use the instant payment notification system to do this.. That's what I do for BlogSlammer!.. Basically you need to set up some sort of authentication to the member area... The thankyou page should have text stating an email is being sent with that information. Now use the instant payment notification system to automatically send this email..
Hey Exilus, I actually just finished setting one up, here's what you need to do: For the thank you page we want to automatically generate a username and password, you'll need to check clickbanks variables because I don't remember them off the top of my head. We'll be using clickbanks cbValid() function to start off with. if(cbValid == 1){ $username = mysql_real_escape_string($_GET['ccemail']); $password = md5(randomPass()); // you'll need to write a function that gives them a random password $query = "INSERT INTO users (username,password) VALUES ('{$username}','{$password}')"; mysql_query($query); // add your email with their username and password // print out the thank you stuff... they're getting an email etc. etc. Code (markup): You should be using sessions so to accomplish your redirect do something like this: session_start(); if(isset($_SESSION['user']){ // allow this person to see }else{ header('location: landingpage.html'); //redirect user to landing page } Code (markup): The session checker above isn't that secure... I would add a database query to check that the session is registered and maybe rotate them, but that's only if you want it to be really secure. Hope this helps.