Fruddy Posted August 3, 2006 Share Posted August 3, 2006 I followed the PHP Membership System tutorial, and when i go to the register.php i get this message:Parse error: parse error, unexpected $ in /home/virtual/my-project.dk/public_html/register.php on line 115On line 119 is where i close my php tag, ?> its like theres something wrong the the mail function.[code]<?# tip: its always best to have an include file with all your# database information in one location. I'll post this file next.include 'database.php';# grab the POST variables from the HTML form,# put them into PHP variables so we can work with them$first_name = $_POST['first_name'];$last_name = $_POST['last_name'];$email_address = $_POST['email_address'];$username = $_POST['username'];$info = $_POST['info'];$first_name = stripslashes($first_name);$last_name = stripslashes($last_name);$email_address = stripslashes($email_address);$username = stripslashes($username);$info = stripslashes($info);# Any errors in the posted fields? Lets check...# If there is an error, then we show the join form again# so they can fill it out again. If everything# checks out, then go ahead with your bad self!if((!$first_name) || (!$email_address) || (!$username)){ echo 'Du har ikke udfyldt de påkrævede felter! <br />'; if(!$first_name){ echo "Fornavn er et påkrævet felt!<br />"; if(!$email_address){ echo "Emailadresse er et påkrævet felt!<br />"; } if(!$username){ echo "Brugernavn er et påkrævet felt!<br />"; } include 'join_form.html'; exit();} # does this user already exist in the database? lets check for that now... $sql_email_check = mysql_query("SELECT email_address FROM users WHERE email_address='$email_address'"); $sql_username_check = mysql_query("SELECT username FROM users WHERE username='$username'"); $email_check = mysql_num_rows($sql_email_check); $username_check = mysql_num_rows($sql_username_check); if(($email_check > 0) || ($username_check > 0)){ echo "Fix følgende fejl: <br />"; if($email_check > 0){ echo "<strong>Emailadressen er allerede blevet taget! Vælg et andet.<br />"; unset($email_address); } if($username_check > 0){ echo "Brugernavnet er allerede blevet taget! Vælg et andet.<br />"; unset($username); } include 'join_form.html'; // Show the form again! exit(); } # everything checks out so far, so lets add this user!/* Random Password generator. Thanks a ton, phpfreak!http://www.phpfreaks.com/quickcode/Random_Password_Generator/56.phpWe'll generate a random password for theuser and encrypt it, email it and then enter it into the db.*/function makeRandomPassword() { $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass;}$random_password = makeRandomPassword();$db_password = md5($random_password);/* Enter info into the Database.I changed a little bit here from phpfreak's awesome tutorial on this subject. When I would get data from the user, I would not get an unencrypted password, only the md5 encrypted one. I couldn't use that, and me being the powertrip guy, I wrote in another little snippet to grab that password before it gets encrypted and stuff it into a blank variable, and write it to the database. Pretty nifty, eh?*/$info2 = htmlspecialchars($info);$sql = mysql_query("INSERT INTO users (first_name, last_name, email_address, username, password, info, signup_date, decrypted_password) VALUES('$first_name', '$last_name', '$email_address', '$username', '$db_password', '$info2', now(), '$random_password')") or die (mysql_error());if(!$sql){ echo 'Det er kommet en fejl. Kontakt webmasteren';} else { $userid = mysql_insert_id(); // Let's mail the user! $subject = "Your Distributor Membership at www.my-project.dk"; $message = "Dear $first_name $last_name, You are now registered at our website, http://www.my-project.dk! To activate your membership, please login here: http://www.mywebsite.com/distributors_section/login_form.html Once you activate your membership, you will be able to login with the following information: Username: $username Password: $random_password Please keep this username and password in a location that is easily accessible by you. Thanks! #Fruddy my-project.dk This is an automated response, please do not reply!"; mail($email_address, $subject, $message, "From: MyWebSite<email@mywebsite.com>\nX-Mailer: PHP/" . phpversion());}?> [/code] Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/ Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 that error message normaly means that you are missing a { somewhere Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68424 Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 I copied this to view in dreamweaverLine 25-26 of that text is missing an }3rd line down in my example[code=php:0]if((!$first_name) || (!$email_address) || (!$username)){ echo 'Du har ikke udfyldt de påkrævede felter! <br />'; if(!$first_name){ echo "Fornavn er et påkrævet felt!<br />"; if(!$email_address){ echo "Emailadresse er et påkrævet felt!<br />"; } if(!$username){ echo "Brugernavn er et påkrævet felt!<br />"; } include 'join_form.html'; exit();}[/php Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68434 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 Well now the php error message is gone, but:http://www.my-project.dk/register.phpIts says that this is a resticted area, and its not showing the join_form.php Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68454 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 ok did you change[code=php:0]if((!$first_name) || (!$email_address) || (!$username)){ echo 'Du har ikke udfyldt de påkrævede felter! <br />'; if(!$first_name){ echo "Fornavn er et påkrævet felt!<br />"; if(!$email_address){ echo "Emailadresse er et påkrævet felt!<br />"; } if(!$username){ echo "Brugernavn er et påkrævet felt!<br />"; } include 'join_form.html'; exit();}[/code]To[code=php:0]if((!$first_name) || (!$email_address) || (!$username)){ echo 'Du har ikke udfyldt de påkrævede felter! <br />'; if(!$first_name){ echo "Fornavn er et påkrævet felt!<br />"; } if(!$email_address){ echo "Emailadresse er et påkrævet felt!<br />"; } if(!$username){ echo "Brugernavn er et påkrævet felt!<br />"; } include ("join_form.html"); exit;}[/code]Good luck,Tom Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68457 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 Yea i have modified a }but:[quote]Well now the php error message is gone, but:http://www.my-project.dk/register.phpIts says that this is a resticted area, and its not showing the join_form.php[/quote] Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68464 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 no, look at my second example a little closer. You also did not wrap the include in ()try changing [code=php:0]include("whatever.php");[/code] Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68467 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 Ok i have changes the exit; now, but not the big change:www.my-project.dk/register.php[code]if((!$first_name) || (!$email_address) || (!$username)){ echo 'Du har ikke udfyldt de påkrævede felter! <br />'; if(!$first_name){ echo "Fornavn er et påkrævet felt!<br />"; } if(!$email_address){ echo "Emailadresse er et påkrævet felt!<br />"; } if(!$username){ echo "Brugernavn er et påkrævet felt!<br />"; } include ("http://www.my-project.dk/join.php"); exit;}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68470 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 I get this message after trying to register.Dit brugernavn og kodeord passer ikke! Eller du har ikke valideret din brugeropretning endnu!Prøv igen!! Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68471 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 yea, but if u go to www.my-project.dk/register.phpDu har ikke udfyldt de påkrævede felter!Fornavn er et påkrævet felt!Emailadresse er et påkrævet felt!Brugernavn er et påkrævet felt!Du har ikke rettigheder til det pågældende sted.You have not rights to view this area.And the login_form is missing. Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68472 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 ok you need to create a form with the html that will post to this script. The reason that it is showing your error messages is that you are going directly to the register.php instead of the html form Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68474 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 But my join_form contains PHP:join.php<?php# starting the session heresession_start();if ($_SESSION['email_address'] != "youremail@here.com" ) { echo "<b>Du har ikke rettigheder til det pågældende sted.</b><br><br><br>";# this prevents a user from typing or pasting a URL string# into their browser to get to this page. If the $first_name# variable is empty, then they log in like everyone else.if ( empty( $first_name ) ) { print "Please login below!"; include 'login_form.php';}} else { print "# Here's the HTML form. Pretty simple, cut and dried.# You should have learned this in day one of HTML class.# See, this tutorial isn't that hard, is it?!<form name=form1 method=post action=register.php> <table width=100% border=0 cellpadding=4 cellspacing=0> <tr> <td width=24% align=left valign=top>Fornavn</td> <td width=76%><input name=first_name type=text id=first_name2></td> </tr> <tr> <td align=left valign=top>Efternavne</td> <td><input name=last_name type=text id=last_name></td> </tr> <tr> <td align=left valign=top>Email</td> <td><input name=email_address type=text id=email_address></td> </tr> <tr> <td align=left valign=top>Brugernavn</td> <td><input name=username type=text id=username></td> </tr> <tr> <td align=left valign=top>Lidt om dig</td> <td><textarea name=info id=info></textarea></td> </tr> <tr> <td align=left valign=top> </td> <td><input type=submit name=Submit value=opret bruger!></td> </tr> </table>"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68475 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 Someone realy needs to write a new member system tutorial. That one is a bit out of date. Give me a few minutes and I will write you a better register script/form and login script/form. Both will be more secure. Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68480 Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 2 steps ahead of you Creating a members area tutorialPart 1http://www.onlyican.com/learnit/tutorial2_part1/tutorial2_part1.swfPart2http://www.onlyican.com/learnit/tutorial2_part2/tutorial2_part2.swf Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68482 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 Alright here go (sorry it took so long)[b]here is the register.php[/b][code=php:0]<?phpinclude("db.php");//your database connection filearray_pop($_POST);if ( get_magic_quotes_gpc() ) { $_POST= array_map('stripslashes', $_POST); }$username = mysql_real_escape_string(trim($_POST['username']));$first_name = mysql_real_escape_string(trim($_POST['first_name']));$last_name = mysql_real_escape_string(trim($_POST['last_name']));$email = mysql_real_escape_string(trim($_POST['email_address'])); if ((!$username) || (!first_name) || (!$last_name) || (!email_address)) { $message = "info"; if (!username) { $error = "username"; } if (!first_name) { $error = "first_name"; } if (!$last_name) { $error = "last_name"; } if (!email_address) { $error = "email_address"; } include("join.php"); exit;} $user_sql = "SELECT COUNT (*) user_match FROM 'users' WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) email_match FROM 'users' WHERE 'email_address' ='$email'";$res= mysql_query($user_sql) or die(mysql_error());$result= mysql_query($email_sql) or die(mysql_error());$user_match= mysql_result($res, 0, 'user_match');$email_match= mysql_result($result, 0, 'email_match');if (($user_match > 0) || ($email_match > 0)) { if ($username > 0 ) { $message = "username_match"; unset($username) } if ($email_match > 0) { $message = "email_match"; unset($email); } include("join.php"); exit;}function makepassword() { $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; }$randompwd = makepassword();$mdpwd = md5($randompwd);$sql = mysql_query("INSERT INTO users (first_name, last_name, email_address, username, password, signup_date) VALUES('$first_name', '$last_name', '$email_address', '$username', '$mdpwd', now())") or die (mysql_error()); if(!$sql){ echo 'Det er kommet en fejl. Kontakt webmasteren';} else { $userid = mysql_insert_id(); // Let's mail the user! $subject = "Your Distributor Membership at www.my-project.dk"; $message = "Dear $first_name $last_name, You are now registered at our website, http://www.my-project.dk! To activate your membership, please login here: http://www.mywebsite.com/distributors_section/login_form.html Once you activate your membership, you will be able to login with the following information: Username: $username Password: $random_password Please keep this username and password in a location that is easily accessible by you. Thanks! #Fruddy my-project.dk This is an automated response, please do not reply!"; mail($email_address, $subject, $message, "From: MyWebSite<email@mywebsite.com>\nX-Mailer: PHP/" . phpversion());}?>[/code][b]And here is the form that posts to it.Join.php[/b][code=php:0] <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Join Us</title></head><body><?phpif (($message == "info") || ($message == "email_check") || ($message == "username_check")) { if ($message == "info") { echo "You did not submit the following information"; if ($error == "username") { echo "Username is a required field"; } if ($error == "first_name") { echo "First Name is a required field"; } if ($error == "last_name") { echo "Last name is a required field"; } if ($error == "email_address") { echo "Your email address is a required field"; } } if ($message == "email_check") { echo "You are already a member."; } if ($message == "username_check") { echo "Your username is already being used by another member. Please try again."; }} ?><form method="post" action="register.php"> <table width="100%" border="0" cellpadding="4" cellspacing="0"> <tr> <td width="24%" align="left" valign="top">Fornavn</td> <td width="76%"><input name="first_name" type="text" id="first_name2"></td> </tr> <tr> <td align="left" valign="top">Efternavne</td> <td><input name="last_name" type="text" id="last_name"></td> </tr> <tr> <td align="left" valign="top">Email</td> <td><input name="email_address" type="text" id="email_address"></td> </tr> <tr> <td align="left" valign="top">Brugernavn</td> <td><input name="username" type="text" id="username"></td> </tr> <td align="left" valign="top"> </td> <td><input type="submit" name="Submit" value="opret bruger!"></td> </tr> </table></form> </body></html>[/code][b]Here is the checkuser.php[/b][code=php:0]<?phpsession_start(); include ('includes/db.php');array_pop($_POST); if ( get_magic_quotes_gpc() ) { $_POST= array_map('stripslashes', $_POST); } $username= mysql_real_escape_string(trim($_POST['username'])); $password= mysql_real_escape_string(trim($_POST['password']));$mdpwd= md5($password);if ((!$username) || (!password)) { $message = "login_info"; include("login.php"); exit;} $sql= sprintf("SELECT COUNT(*) AS login_match FROM `users` WHERE `username` = '%s' AND `password`= '%s'", $username, $mdpwd); $res= mysql_query($sql) or die(mysql_error()); $login_match= mysql_result($res, 0, 'login_match'); if ( $login_match == 1 ) { $_SESSION['username']= "$username"; include("somepage.php");//where ever you want a loged in user to go to} else { $error ="userinfo"; include('login.php'); // not logged in }?>[/code][b]and here is the form that posts to it.login.php[/b][code=php:0]<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Login Form</title></head><body><?phpif (($message == "login_info") || (!$message == "userinfo") { if ($message == "login_info") { echo "You did not enter your username or password. Please try again."; } if ($message == "userinfo") { echo "Your username and password do not match. Please try again"; }} ?><form action="checkuser.php" method="post" name="form1"> <div align="justify"> <table width="50%" border="0" align="center" cellpadding="4" cellspacing="0"> <tr> <td width="20%">Brugernavn</td> <td width="80%"><input name="username" type="text" id="username"></td> </tr> <tr> <td>Kodeord</td> <td><input name="password" type="password" id="password"></td> </tr> <tr> <td> </td> <td><input type="submit" name="Submit" value="Submit"></td> </td> </table> </div></form> </body></html>[/code]Hope this helps,Tom Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68529 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 Phew! Thansk for the great work Tomfmason!I think theres missing a end } somewhere, but I cant figure out where ???www.my-project.dk/register.php[code]<?phpinclude("db.php");//your database connection filearray_pop($_POST);if ( get_magic_quotes_gpc() ) { $_POST= array_map('stripslashes', $_POST); }$username = mysql_real_escape_string(trim($_POST['username']));$first_name = mysql_real_escape_string(trim($_POST['first_name']));$last_name = mysql_real_escape_string(trim($_POST['last_name']));$email = mysql_real_escape_string(trim($_POST['email_address']));if ((!$username) || (!first_name) || (!$last_name) || (!email_address)) { $message = "info";if (!username) { $error = "username";}if (!first_name) { $error = "first_name";}if (!$last_name) { $error = "last_name";}if (!email_address) { $error = "email_address";}include("join.php");exit;}$user_sql = "SELECT COUNT (*) user_match FROM 'users' WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) email_match FROM 'users' WHERE 'email_address' ='$email'";$res= mysql_query($user_sql) or die(mysql_error());$result= mysql_query($email_sql) or die(mysql_error());$user_match= mysql_result($res, 0, 'user_match');$email_match= mysql_result($result, 0, 'email_match');if (($user_match > 0) || ($email_match > 0)) { if ($username > 0 ) { $message = "username_match";unset($username) }if ($email_match > 0) { $message = "email_match";unset($email);}include("join.php");exit;}function makepassword() { $salt = "abchefghjkmnpqrstuvwxyz0123456789"; srand((double)microtime()*1000000); $i = 0; while ($i <= 7) { $num = rand() % 33; $tmp = substr($salt, $num, 1); $pass = $pass . $tmp; $i++; } return $pass; }$randompwd = makepassword();$mdpwd = md5($randompwd);$sql = mysql_query("INSERT INTO users (first_name, last_name, email_address, username, password, signup_date) VALUES('$first_name', '$last_name', '$email_address', '$username', '$mdpwd', now())") or die (mysql_error());if(!$sql){ echo 'Det er kommet en fejl. Kontakt webmasteren'; } else { $userid = mysql_insert_id(); // Let's mail the user! $subject = "Your Distributor Membership at www.my-project.dk"; $message = "Dear $first_name $last_name, You are now registered at our website, http://www.my-project.dk! To activate your membership, please login here: http://www.mywebsite.com/distributors_section/login_form.html Once you activate your membership, you will be able to login with the following information: Username: $username Password: $random_password Please keep this username and password in a location that is easily accessible by you. Thanks! #Fruddy my-project.dk This is an automated response, please do not reply!"; mail($email_address, $subject, $message, "From: MyWebSite<email@mywebsite.com>\nX-Mailer: PHP/" . phpversion());}?> <script language="JavaScript"> alert("Du kan nu logge ind!") location.href = "http://www.my-project.dk";</script>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68568 Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 2nd IF statementif ((!$username) || (!first_name) || (!$last_name) || (!email_address)) { $message = "info";if (!username) { Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68571 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 no that is not it. For some reason the if's get all messed up when posting them. The problem is with the [code=php:0]if (($user_match > 0) || ($email_match > 0)) { if ($username > 0 ) { $message = "username_match";unset($username) //<---right here. I forgot a ;}if ($email_match > 0) { $message = "email_match";unset($email);}include("join.php");exit;}[/code]@onlyicanThe if statement there is meant to inclose more ifs. so if there is no username,first_name, last_name or email then it will proceed with the ifs and define the error messages. Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68577 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 Ok, now theres no error message in the register.php, BUT try to make a user...[b]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '(*) user_match FROM 'users' WHERE 'username' ='sdasa'' at line[/b] :-[ :-[Is it really that stressfull to make a login system? :-X Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68582 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 It is not stress ful to me. I like a to be challenged. Any way it is another simple error on my part. I keep saying that I am going to test the scripts that I post(so stuff like this won't happen).change[code]$user_sql = "SELECT COUNT (*) user_match FROM 'users' WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) email_match FROM 'users' WHERE 'email_address' ='$email'";[/code]To[code]$user_sql = "SELECT COUNT (*) AS user_match FROM 'users' WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) AS email_match FROM 'users' WHERE 'email_address' ='$email'";[/code]Forgot an [b]AS[/b]. Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68585 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 Still not working :-\ Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68599 Share on other sites More sharing options...
onlyican Posted August 3, 2006 Share Posted August 3, 2006 the field name users is using single quotesThey are not the tick thingies.$user_sql = "SELECT COUNT (*) AS user_match FROM users WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) AS email_match FROM users WHERE 'email_address' ='$email'"; Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68606 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 doesnt quite understand you... Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68609 Share on other sites More sharing options...
tomfmason Posted August 3, 2006 Share Posted August 3, 2006 change[code=php:0] $user_sql = "SELECT COUNT (*) AS user_match FROM 'users' WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) AS email_match FROM 'users' WHERE 'email_address' ='$email'";[/code]to[code=php:0]$user_sql = "SELECT COUNT (*) AS user_match FROM `users` WHERE 'username' ='$username'";$email_sql = "SELECT COUNT (*) AS email_match FROM `users` WHERE 'email_address' ='$email'";[/code]Try this and if there are anymore errors I will debug it on my server and post the fixed code. Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68621 Share on other sites More sharing options...
Fruddy Posted August 3, 2006 Author Share Posted August 3, 2006 didnt work :-\ Quote Link to comment https://forums.phpfreaks.com/topic/16427-php-membership-system-problem/#findComment-68628 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.