Jump to content

User database login. help please


Recommended Posts

Hi

 

I am not at all experienced at php so please bear with me.

 

I have a website with six separate mysql databases. Each section/database has their own pages and each has their own login with users . But this is causing a small problem and ideally we'd like everyone to login to just one database and then go from there to do what ever they want to do.

 

Essentially create a global login for all databases from just one user section.

 

The current login code is pasted in below. Can anyone tell me what I need to change in order to make it 'look' for a certain database in which to confirm user login details? Or am I completely way way off base and this actually utterly impossible to do??

 

Thanks for your time

 

Jen

________________________________

 

<?

$content = ob_get_contents();

 

ob_end_clean();

 

?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" type="text/css" href="style.css" />

   

 

</head>

<body onload="xz()" onunload="GUnload()" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

 

<div id='toparea'>

 

<div id='login'>

<?

if (!isset($_SESSION["email"])) {

echo("<form action='".$_SERVER["PHP_SELF"]."' method='post'>

Email address:<br />

Password:

</div>

<div style='width: 280px; float: right'>

<input type='text' name='email' /><br />

<input type='password' name='pass' />

<input type='submit' value='Log In' /><br />

<a href='forgot.html'>forgotten password?</a>

".$login_error."

</div>

<div class='clear'></div>

</form>");

}

 

?>

</div>

</div>

<div>

  <div id='mainbody' style='width: 1100px'>

     

    <?

echo $content;

?>

  </div>

</div>

 

</body>

</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.