# Login

**URL:** https://forum.kirupa.com/t/login/238412
**Category:** Uncategorized
**Created:** [September 11, 2007, 3:42am UTC](https://forum.kirupa.com/t/login/238412 "2007-09-11T03:42:42Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lillizzierae](https://avatars.discourse-cdn.com/v4/letter/l/848f3c/32.png) [@lillizzierae](https://forum.kirupa.com/u/lillizzierae)
#### Post date: [September 11, 2007, 3:42am UTC](https://forum.kirupa.com/t/login/238412/1 "2007-09-11T03:42:42Z")

</div>

I’m building a login and getting errors. I’m using dreamweaver 8 to build it. Whenever I go to the page I get this error:

**Warning** : require\_once(Connections/personalsite.php) [[function.require-once](http://lizzienichols.com/function.require-once)]: failed to open stream: No such file or directory in **/home/lizzieni/public\_html/work.php** on line **1**

**Fatal error** : require\_once() [[function.require](http://lizzienichols.com/function.require)]: Failed opening required ‘Connections/personalsite.php’ (include\_path=‘.:/usr/lib/php:/usr/local/lib/php’) in **/home/lizzieni/public\_html/work.php** on line \*\*1

\*\*  
What confuses me is it’s saying “personalsite.php” personalsite is only what I named my connection for MySQL Connection. The database is “website” and the table is “newmember” And “work.php” is where the login is located. What am I doing wrong? as of now, this is the code:

> 

\<?php require\_once(‘Connections/personalsite.php’); ?\>  
\<?php  
// \*\*\* Validate request to login to this site.  
if (!isset($\_SESSION)) {  
session\_start();  
}

$loginFormAction = $\_SERVER[‘PHP\_SELF’];  
if (isset($\_GET[‘accesscheck’])) {  
$\_SESSION[‘PrevUrl’] = $\_GET[‘accesscheck’];  
}

if (isset($\_POST[‘reemail’])) {  
$loginUsername=$\_POST[‘reemail’];  
$password=$\_POST[‘password’];  
$MM\_fldUserAuthorization = “”;  
$MM\_redirectLoginSuccess = “index.php”;  
$MM\_redirectLoginFailed = “index.php”;  
$MM\_redirecttoReferrer = false;  
mysql\_select\_db($database\_personalsite, $personalsite);

$LoginRS\_\_query=sprintf(“SELECT reemail, password FROM newmember WHERE reemail=‘%s’ AND password=‘%s’”,  
get\_magic\_quotes\_gpc() ? $loginUsername : addslashes($loginUsername), get\_magic\_quotes\_gpc() ? $password : addslashes($password));

$LoginRS = mysql\_query($LoginRS\_\_query, $personalsite) or die(mysql\_error());  
$loginFoundUser = mysql\_num\_rows($LoginRS);  
if ($loginFoundUser) {  
$loginStrGroup = “”;

```
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;          

if (isset($_SESSION['PrevUrl']) && false) {
  $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];    
}
header("Location: " . $MM_redirectLoginSuccess );

```

}  
else {  
header("Location: ". $MM\_redirectLoginFailed );  
}  
}  
?\>  
\<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “[http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd](http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd)”\>  
\<html xmlns=“[XHTML namespace](http://www.w3.org/1999/xhtml)”\>  
\<head\>  
\<meta http-equiv=“Content-Type” content=“text/html; charset=iso-8859-1” /\>  
\<title\>Elizabeth Nichols - Portfolio\</title\>

\<link href=“css.css” rel=“stylesheet” type=“text/css” /\>  
\<link rel=“stylesheet” href=“css/lightbox.css” type=“text/css” media=“screen” /\>

\<script type=“text/javascript” src=“js/prototype.js”\>\</script\>  
\<script type=“text/javascript” src=“js/scriptaculous.js?load=effects”\>\</script\>  
\<script type=“text/javascript” src=“js/lightbox.js”\>\</script\>

\<style type=“text/css”\>

#container1 {  
font-family: “Times New Roman”, Times, serif;  
font-size: 14px;  
color: #FFFFFF;  
margin-right: 70px;  
margin-left: 80px;  
padding: 3px;  
background-color: #000000;  
background-image: url(images/nichols\_back.png);  
background-repeat: no-repeat;  
background-position: top center;  
height: 1300px;  
width: 800px;  
}

#footer\_container1 {  
margin-top: 10px;  
margin-bottom: 10px;  
position:absolute;  
left:108px;  
top:1270px;  
font-size: 10px;  
width: 258px;  
height: 21px;  
}

#body3 {  
position:absolute;  
left:266px;  
top:672px;  
text-align: left;  
float: left;  
height: 486px;  
width: 479px;  
background-color: #333333;  
}

a:link {  
color: #000000;  
text-decoration: none;  
}  
a:visited {  
color: #000000;  
text-decoration: none;  
}  
a:hover {  
color: #000000;  
text-decoration: none;  
}  
a:active {  
color: #000000;  
text-decoration: none;  
}  
\</style\>  
\</head\>

\<body id=“body”\>  
\<div id=“container1”\>  
\<div id=“login”\>  
\<form action=“\<?php echo $loginFormAction; ?\>” method=“POST” name=“login”\>  
Email Address:\<br /\>  
\<input name=“reemail” type=“text” size=“18” maxlength=“30” /\>  
\<br /\>  
Password:\<br /\>  
\<input name=“password” type=“password” size=“18” maxlength=“30” /\>  
\</form\>  
\<br /\>  
\<p align=“center”\>\<a href=“newmembers.php”\>\<input name=“new” type=“button” value=“New” /\>\</a\> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  
\<input name=“submit” type=“submit” value=“Login” /\>  
\</p\>  
\</div\>
