PHP - Moved: Membership Site
This topic has been moved to Miscellaneous.
http://www.phpfreaks.com/forums/index.php?topic=349090.0 Similar TutorialsI'm planning to learn how to create membership sites. For example members can get certain features if they sign up with a plan. Besides adding "subscribe" buttons is there a way to integrate Paypal with Mysql? Maybe if a member subscribes, update their "member" column with a "subscribed" status and then with php activate premium options if the user is subscribed. Is this sort of integration possible with Paypal? This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=342885.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=321119.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=342211.0 Hi all,
Im moving back into php coding after a few years of using .net.
Would anyone be able to point me in the direction of a good login/register tutorial as a) i forgotten alot b) i have been told mysql is a big no no now and to use mysqli.
I have searching google and found nothing hat a) works b) is any good
This topic has been moved to mod_rewrite. http://www.phpfreaks.com/forums/index.php?topic=318858.0 Hello, I'm new to this forum, but after searching for a while I'm trying to find out what script is being used on a particular site. Not sure if direct links are cool here, so I won't post it until I know, unless someone wants to private message me of course. Trying to clone the type of site for a client. Thanks for the help. jbx I have a website with a membership script in PHP, on the registration page it asks questions such as name, address, business etc. and some of these fields need to be multip selections, there is also an account page where these fields can be changed as things change. I cannot get the multiple selections to save, they do not go to the database and are not there when you go to the account page. I am attaching my registration.php page the account.php page and the class_user.php is available if needed it wouldn't let me attach all 3
Attached Files
account.php 16.41KB
1 downloads
register.php 11.77KB
1 downloads Parse error: syntax error, unexpected $end in C:\xampp\htdocs\register_process.php on line 97 Here is the script hope fully someone can help me i attached the script too Code: [Select] <?php include 'includes/database.php'; if(isset($_POST['submit'])) { $username = addslashes(trim($_POST['username'])); $email = addslashes(trim($_POST['email'])); $pass = addslashes(trim($_POST['password'])); $conf = addslashes(trim($_POST['confirm'])); $ip = $_SERVER['REMOTE_ADDR']; $date = date("d, m y"); if ( $_POST['password'] == $_POST['confirm'] ) {}else{ echo '<script>alert("Your passwords were not the same, please enter the same password in each field.");</script>'; echo '<script>history.back(1);</script>'; exit; } $password = md5($pass); if ((((( empty($first) ) || ( empty($surname) ) || ( empty($username) ) || ( empty($email) ) || ( empty($password) ))))) { echo '<script>alert("One or more fields was left empty, please try again.");</script>'; echo '<script>history.back(1);</script>'; exit; } if((!strstr($email , "@")) || (!strstr($email , "."))) { echo '<script>alert("The email you have entred is an invalid email address.")';</script>; echo '<script>history.back(1);</script>'; exit; } $actkey = mt_rand(1, 500).'f78dj899dd'; $act = sha1($actkey); $query = mysql_query("INSERT INTO Users (Username, Password, Email, Date, IP, Actkey) VALUES ('$username','$email','$date','@ip','$act')") or die(mysql_error()); $send = mail($email , "Registration Confirmation","Thank you for registrering with EthicGamer.com\n\nYour username and password is below, along with details on how to activate your account.n\nUser:".$username."\nPass:".$pass."\n\nClick the link below to activate your account:\nhttp://ethicgamers.com/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks","FROM: activate@ethicgamers.com"); if(($query)&&($send)) { echo ' <html> <head> </head> <body> <div> <p>Thank you for registering, you will recieve an email soon with your login details and your activation link so that you can activate your account.</p> <p><a href="login.php">Click here</a> to login once you have activated.</p> </div> </body> </html> '; } else { echo ' <html> <body> <div> <p>We are sorry, there appears to be a problem with our script at the moment.</p> <p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.'</p> <p>Please try again later.</p> </div> </body> </html> '; } } else { echo "You have to fill out the form first!"; } ?> Parse error: syntax error, unexpected $end in C:\xampp\htdocs\register_process.php on line 97 Here is the script hope fully someone can help me i attached the script too Shud not be a hard job Code: [Select] <?php include 'includes/database.php'; if(isset($_POST['submit'])) { $username = addslashes(trim($_POST['username'])); $email = addslashes(trim($_POST['email'])); $pass = addslashes(trim($_POST['password'])); $conf = addslashes(trim($_POST['confirm'])); $ip = $_SERVER['REMOTE_ADDR']; $date = date("d, m y"); if ( $_POST['password'] == $_POST['confirm'] ) {}else{ echo '<script>alert("Your passwords were not the same, please enter the same password in each field.");</script>'; echo '<script>history.back(1);</script>'; exit; } $password = md5($pass); if ((((( empty($first) ) || ( empty($surname) ) || ( empty($username) ) || ( empty($email) ) || ( empty($password) ))))) { echo '<script>alert("One or more fields was left empty, please try again.");</script>'; echo '<script>history.back(1);</script>'; exit; } if((!strstr($email , "@")) || (!strstr($email , "."))) { echo '<script>alert("The email you have entred is an invalid email address.")';</script>; echo '<script>history.back(1);</script>'; exit; } $actkey = mt_rand(1, 500).'f78dj899dd'; $act = sha1($actkey); $query = mysql_query("INSERT INTO Users (Username, Password, Email, Date, IP, Actkey) VALUES ('$username','$email','$date','@ip','$act')") or die(mysql_error()); $send = mail($email , "Registration Confirmation","Thank you for registrering with EthicGamer.com\n\nYour username and password is below, along with details on how to activate your account.n\nUser:".$username."\nPass:".$pass."\n\nClick the link below to activate your account:\nhttp://ethicgamers.com/activate.php?id=".$act."\n\nPlease do not reply, this is an automated mailer.\n\nThanks","FROM: activate@ethicgamers.com"); if(($query)&&($send)) { echo ' <html> <head> </head> <body> <div> <p>Thank you for registering, you will recieve an email soon with your login details and your activation link so that you can activate your account.</p> <p><a href="login.php">Click here</a> to login once you have activated.</p> </div> </body> </html> '; } else { echo ' <html> <body> <div> <p>We are sorry, there appears to be a problem with our script at the moment.</p> <p>Your data was not lost. Username: '.$username.' | Password: '.$pass.' | Email: '.$email.'</p> <p>Please try again later.</p> </div> </body> </html> '; } } else { ?> This topic has been moved to Application Design. http://www.phpfreaks.com/forums/index.php?topic=353404.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=347622.0 This topic has been moved to Beta Test Your Stuff!. http://www.phpfreaks.com/forums/index.php?topic=317260.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=346043.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=354819.0 This topic has been moved to PHP Applications. http://www.phpfreaks.com/forums/index.php?topic=307287.0 This topic has been moved to Other. http://www.phpfreaks.com/forums/index.php?topic=320387.0 This topic has been moved to PHP Freelancing. http://www.phpfreaks.com/forums/index.php?topic=345549.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=346529.0 |