PHP MySQL Login/Registration System for Website

DekkaG
DekkaG used Ask the Experts™
on
I am trying to create a PHP/MySQL Login/Registration System. Right now, I am using the demo from this website:

http://www.easykiss123.com/easy-setup-of-login-registration-and-password-protected-areas-on-your-website/

I took their files and added my own header.php/footer.php files and want to maintain the layout of my own site. Unfortunately, with or without my own formatting, I can't get this thing to work. Is it a compatibility issue between Yahoo! WebHosting's MySQL and the design of the script?

Here are my issues, summarized:
1) If I include their config.inc.php file at the top of the page, the content below wherever I include that file completely disappears.
2) I'm not sure if this is a secure login system, and I need to find one so that I can eventually make it so different users get redirected to different pages
3) I modified the "index.php" page included in the easykiss123 file to be my "clients.php" page . . . I've posted the code I'm using on that page below.

Help please! I just need a secure login system with an easy registration system that's secure, and compatible with my Yahoo! Web Hosting.

They use the following info, by the way:
---------------------------------------
mysql
Server version: 4.1.14

phpMyAdmin - 2.11.9
MySQL client version: 3.23.49
Used PHP extensions: mysql
<?php     $pageTitle = "Client Resources";   
    require_once "includes/header.php"; 
    require_once ('includes/config.inc.php'); 
 
?>
<div class="main">    <div class="impact">       
 <img src="images/home-img.jpg" alt=""/>        
<h3>Learn, Develop, Succeed</h3>    
</div>       
 
 <div class="gradient">       
 <div class="content">
 
            <h2>Client Login Control Panel</h2>
            
            <p>Please select a valid option from the right to begin login or registration.</p>
            
        </div>
 
 
<div class="sidebarii">
<a href="clients.php" title="Client Resources">Client Login Homepage</a><br />
 
<?php
 
// Display links based upon the login status:
if (isset($_SESSION['user_id'])) {
 
	echo '<a href="logout.php" title="Logout">Logout</a><br />
<a href="change_password.php" title="Change Your Password">Change Password</a><br />';
 
	// Add links if the user is an administrator:
	if ($_SESSION['user_level'] == 1) {
 
		echo '<br /><h4>Administrator</h4>';
		echo '<a href="view_users.php" title="View Users">View Users</a><br />';
 
	}
	
} else { //  Not logged in.
 
	echo '<a href="register.php" title="Register for the Site">Register</a><br />
<a href="login.php" title="Login">Login</a><br />
<a href="forgot_password.php" title="Password Retrieval">Retrieve Password</a><br />';
 
}
 
?>
 
        <div class="clear"></div>
    </div>
 
<?php require_once "includes/footer.php"; 
 
// Welcome the user (by name if they are logged in):
echo '<div class="content"><h3>Welcome';
if (isset($_SESSION['first_name'])) {
	echo ", {$_SESSION['first_name']}!";
}
echo '</div></h3>';
?>

Open in new window

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I used vSignup 2.5 available here

http://www.beanbug.net/vScripts.php

email notification with registration key (or not)
multi-level membership
fast and secured.

Author

Commented:
But is that going to be compatible with the MySQL and PHP MyAdmin versions I listed below? That's the problem I ran into before (as noted above)
I know it is compatible with php 4.3 and above, I don't know for sure about mysql and phpmyadmin but I do know I've been using it for quite a while, so it is not a script build on the latest of the latest system.
How to Generate Services Revenue the Easiest Way

This Tuesday! Learn key insights about modern cyber protection services & gain practical strategies to skyrocket business:

- What it takes to build a cloud service portfolio
- How to determine which services will help your unique business grow
- Various use-cases and examples

Author

Commented:
Okay . . . I went to the site and I see multiple files, including vAuthenticate. If I want to install this to my site, what exactly do I need to download? Just the vSignup_2.5? I need to customize this to include my header and footer and then have this login info included in the "content" section of my website. Please advise?

Thanks for the quick responses.
Just download the vSignup 2.5 it include everything you need, there is a config file where you enter the specifics of your server setting (username, password etc) make sure you read the documentation and FAQ file it will answer most of the questions you may have.

As far as including your own headers and footer it is just a matter of finding the appropriate html in the file and replace it with your own.

Author

Commented:
So, I uploaded the folder to the site after doing some basic configuration (not customizing it to my site) . . . but even after uploading the entire directory, it doesn't send out a confirmation e-mail. Any thoughts on this?
Make sure you have it configure to send email, you can choose not too, also check in your junk folder.

Author

Commented:
I can't find where that configuration option is . . . but so far it's not sending the e-mail, and the login isn't working.

Author

Commented:
Where do I edit if it's sending a confirmation e-mail or not? Is it possible to verify that this is indeed connecting to my database?
I'm back, don't know for how long.

The default administrator username is sa and the password is access this should bring you the administration panel were you can choose the option you like.

Author

Commented:
Even though I've signed in as "sa" with the password "access" . . . I change it to say that I want to notify & confirm, but it's not sneding out the e-mail. Any idea why? Is there some other place I might be missing a setting? Thanks again.
From the faq file

"Q20. The system does not send out the email either to the member or to the administrator?
A20. There are quite a number of possible reasons for this. The most prominent ones are found in the
      Settings page. Make sure you set the proper value to the said settings. Another possibility is
      that your host does not support the mail() function or has turned it off for some reason. If you
      are testing this out on your local machine, make sure you can use PHP's mail() function first by
      doing a series of simple tests (as I am not familiar with it myself). vSignup's mail-sending
      function was tested online, not on the development server exactly with that reason - the developer
      is not familiar with the settings needed to make mail() work on his machine."
You can do a quick test to see if they have the mail() function turned on.

Save this script with a php extension, make sure you input the required email addresses, upload it to your server and open it up with your browser.

<?php
$to = "";      //put the address where you want to send the email
$subject = "Hi! test from yahoo";
$body = "Hi,\n\nHow are you?";
$from = "";    //put the address from where it is coming (for the reply to)
if (mail($to, $subject, $body, $from)) {
  echo("<p>Message successfully sent!</p>");
 } else {
  echo("<p>Message delivery failed...</p>");
 }
 
 ?>

Author

Commented:
Thanks for the realy fast turnaround. You were completely awesome. I still have a few bugs to work out with this thing. I'll keep your e-mail handy and post new questions (most likely tomorrow) when I resume working on it. Please keep an eye out for me :)

Author

Commented:
This individual is truly a guru and deserves mountains of praise. Thanks for all the help.
Glad to help and I should be around tomorrow.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial