View Single Post
  #8  
Old 05-15-2008, 01:13 AM
auntiebebs auntiebebs is offline
Sergeant
 
Join Date: Apr 2008
Posts: 25
Default Re: How to display database records on screen?

Thanks all.
You know I am not even there yet.
I mean displaying the record on screen because I am still on the login page.
The site would ask for the username and password, then the record will be located and displayed on screen.
That's how its supposed to work.
I thought I would pass this easy but turns out I am stuck here.
Here is the site:http://www.godhearme.org/GHM/ProfileAccess.php
It just would not pull the record to populate another screen.
keeps coming back to the login page.
Whats wrong?
Need help here.. appreciate it. thanks.

sample username: ana password:112233

Here are the codes for the login script:
<?
require_once "ghm_conn.php";

if(isset($s1))
{
if(!empty($username1) && !empty($password1))
{
$sql = "SELECT * FROM _Form_Nr_2 WHERE username = '$username1' AND password = '$password1'";
$result = mysql_query($sql);
if(mysql_num_rows($result) == "1")
{
$a = mysql_fetch_array($result);
$username1 = $a['username'];
$_SESSION[username] = $username1;
header("location:Profile.php");
exit();
}

}
}
include_once "ProfileMain.php";
?>
<center>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<span class=HeaderClass>Members Login </span>
<p class=BlackLink>You must log in to access this area of the site.<br> If you are
not a registered user, <a href="http://www.godhearme.org/GHM/Register.html" class=TNA> click here</a> to sign up.</p>
<p>

<form name=jsl method="post" action="ProfileAccess.php">
<table align=center class=BlackText>
<tr>
<td align=right>Username:</td>
<td> <input type="text" name="username1" size="30" maxlength=30></td>
</tr>
<tr>
<td align=right>Password:</td>
<td><input type="password" name="password1" size="30" maxlength=30></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input type=hidden name=job_id value=<? echo $_GET[job_id]?>>
<input type="submit" name=s1 value=" Login " style="font-family:verdana; font-weight:bold; color:#993300; background-color:white">
</td>
</tr>

<tr>
<td colspan=2 align=center>
<br>
<a class=TNA href=forgot.php> Forgot your username/password? </a></td></tr>

</table>
</form></p>
</center>

<?
Reply With Quote