SecondVersion said:Which are you more fond of? PHP or JavaScript ? :gl:
SecondVersion said:http://www.evolt.org/article/rating/17/60384/index.html <This could possibly give you a little Insight
even though I can access the user page. I looked at all the files but I am not getting anywhere. Would you happen to know why?Warning: mysql_connect(): Access denied for user: 'your_name@localhost' (Using password: YES) in /home/bwsongs/public_html/include/database.php on line 24
Access denied for user: 'your_name@localhost' (Using password: YES)
gamex said:In that page, in constants.php, you need to make some changes to that file, especially the following:
define("DB_USER", "your_name");
define("DB_PASS", "your_pass");
define("DB_NAME", "your_dbname");
Replace your_name with your database username, your_pass with your database password, and your_dbname with the name of your database.
Check the rest of that file, there might be some other things you need to change as well.
Joe
$this->connection = mysql_connect(DB_SERVER, DB_USER, DB_PASS) or die(mysql_error());
<?
/* ---------- user settings ---------- */
$un = "YOUR USER NAME";
$pw = "YOUR PASSWORD";
/* ---------- actions ---------- */
if ($action == "logout") {
session_unset();
echo "<b>You were successfully logged out from the system!</b>";
}
if ($action == "login") {
if ($put_un == $un) {
if ($passw0rd == $pw) {
$_SESSION['auth'] = true;
} else {
$error = "<font color=\"red\">Error:</font> incorrect password/username. <br /> The username/Password are CAsE SEnSItiVE";
}
} else {
$error = "<font color=\"red\">Error:</font> incorrect username/password. The username/password are The User/Password are CAsE SEnSItiVE";
}
}
/* ---------- authenticate ---------- */
if ($_SESSION['auth'] == true) {
/* secure code */
} else {
/* non-secure code */
$view = "login";
}
?>
<? if ($view == "login") { ?>
<form action="private.php" method="post">
Don't have an account? Click <a href="/contact_me.php">here</a><br /> <br>
<table border="0" cellpadding="3" cellspacing="1" width="100%">
<td width="45%" align="center">Username:</td>
<td>
<input type="text" name="put_un" size="20" maxlength="20">
</td>
<tr>
<td align="center">Password:</td>
<td>
<input type="password" name="passw0rd" size="25" maxlength="25" />
</td>
</tr>
</table>
<input name="action" type="hidden" id="action" value="login"><br>
<center> <input type="submit" name="Submit" value="login"><br /><? echo "$error<br>"; ?></center>
</form>
<? } if ($_SESSION['auth'] == true) { ?>
<! -- SECURE CONTENT -->
<a href="private.php?action=logout"><b><?php echo "$un"; ?></b> logout? </a>
PUT YOUR SECURE STUFF HERE
<? } ?>


