Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Software Development
Programming
Programming Q&A
Php register form help.
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Weasel" data-source="post: 180706" data-attributes="member: 9520"><p>[PHP]<?</p><p>// This simple PHP / Mysql membership script was created by www.funkyvision.co.uk</p><p>// You are free to use this script at your own risk</p><p>// Please visit our website for more updates..</p><p>include_once"config.php";</p><p>if (isset($_POST['register'])) {</p><p> $username = $_POST['username'];</p><p> $password = $_POST['password'];</p><p> $email = $_POST['email'];</p><p> $memip = $_SERVER['REMOTE_ADDR'];</p><p> $date = date("d-m-Y");</p><p> if (empty($username) OR empty($password) OR empty($email)) {</p><p> $final_report.= "Please complete the form below..";</p><p> } else if (strlen($username) <= 3 || strlen($username) >= 30) {</p><p> $final_report.="Your username must be between 3 and 30 characters..";</p><p> } else {</p><p> $check_members = mysql_query("SELECT * FROM `members` WHERE `username` = '$username'") or die(mysql_error());</p><p> if (mysql_num_rows($check_members) != 0) {</p><p> $final_report.="The username is already in use!";</p><p> } else if (strlen($password) <= 6 || strlen($password) >= 12) {</p><p> $final_report.="Your password must be between 6 and 12 digits and characters..";</p><p> } else if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {</p><p> $final_report.="Your email address was not valid..";</p><p> } else {</p><p> $create_member = mysql_query("INSERT INTO `members` (`id`,`username`, `password`, `email`, `ip`, `date`)</p><p>VALUES('','$username','$password','$email','$memip','$date')");</p><p> $final_report.="Thank you for registering, you may login.";</p><p> }</p><p> }</p><p> }</p><p> </p><p>?>[/PHP]</p><p> </p><p>Please post the error it gives.</p></blockquote><p></p>
[QUOTE="Weasel, post: 180706, member: 9520"] [PHP]<? // This simple PHP / Mysql membership script was created by www.funkyvision.co.uk // You are free to use this script at your own risk // Please visit our website for more updates.. include_once"config.php"; if (isset($_POST['register'])) { $username = $_POST['username']; $password = $_POST['password']; $email = $_POST['email']; $memip = $_SERVER['REMOTE_ADDR']; $date = date("d-m-Y"); if (empty($username) OR empty($password) OR empty($email)) { $final_report.= "Please complete the form below.."; } else if (strlen($username) <= 3 || strlen($username) >= 30) { $final_report.="Your username must be between 3 and 30 characters.."; } else { $check_members = mysql_query("SELECT * FROM `members` WHERE `username` = '$username'") or die(mysql_error()); if (mysql_num_rows($check_members) != 0) { $final_report.="The username is already in use!"; } else if (strlen($password) <= 6 || strlen($password) >= 12) { $final_report.="Your password must be between 6 and 12 digits and characters.."; } else if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) { $final_report.="Your email address was not valid.."; } else { $create_member = mysql_query("INSERT INTO `members` (`id`,`username`, `password`, `email`, `ip`, `date`) VALUES('','$username','$password','$email','$memip','$date')"); $final_report.="Thank you for registering, you may login."; } } } ?>[/PHP] Please post the error it gives. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Software Development
Programming
Programming Q&A
Php register form help.
Top