My Turnkey Career SiteAdmin is not logging on...PLEASE HELP
Posted: Mon Oct 22, 2007 5:50 pm
Everah | Please use
Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
here is the code for my career site siteadmin loginCode: Select all
<?php
session_start();
require_once "../adminmain.php";
if(!isset($aid)) {
?>
<html>
<head>
<title> Admin Login </title>
</head>
<body><center>
<h1><font size="4" face="Arial, Helvetica, sans-serif">Job Site Admin</font></h1>
<p><form method="post" action="<?=$PHP_SELF?>">
<table>
<tr>
<td><font size="2" face="Arial, Helvetica, sans-serif">Username:</font></td>
<td> <input type="text" name="aid" size="8"></td>
</tr>
<tr>
<td><font size="2" face="Arial, Helvetica, sans-serif">Password:</font></td>
<td><input type="password" name="apass" SIZE="8"></td>
</tr>
<tr>
<td colspan=2 align=right><input type="submit" value=" Login "></td>
</tr>
<tr>
<td colspan=2 align=center> <a class=TN href=forgot.php> <font size="2" face="Arial, Helvetica, sans-serif">Forgot
your password?</font> </a></td>
</tr>
</table>
</form></p>
</center>
</body>
</html>
<?php
exit;
}
session_register("aid");
session_register("apass");
$sql = "SELECT * FROM job_admin_login WHERE
aid = '$aid' AND apass = '$apass'";
$result = mysql_query($sql);
if (!$result)
{
echo "A database error occurred while checking your login details. <br>If this error persists, please contact crash@traffic-jam.ca";
}
elseif (mysql_num_rows($result) == 0) {
session_unregister("aid");
session_unregister("apass");
?>
<html>
<head>
<title> Access Denied </title>
</head>
<body>
<h1> Access Denied </h1>
<p>Your user ID or password is incorrect, or you are not a
registered user on this site. To try logging in again, click
<a href="<?=$PHP_SELF?>">here</a>. </p>
</body>
</html>
<?php
exit;
}
?>Everah | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]