I am creating a login system for my client where the user has to receive an email, login with temp user/pass, update profile, and login to their Control Panel.
I am having issues with the user logging into their Control Panel. I have a form on the login page with a method=”post”. The user has to enter in a username and password (language selector and remember function later). I want to use “get” but that would complicate my password privacy.
I want to be able to have a Welcome (full name) message appear on the next page, in this case being a list of agreements to review. I am having difficulties in trying to take the full name ($full_name) from the control panel to the agreements page, where I want to display it in the welcome message.
I have tried a few different ways of doing this (functions, sessions, etc.) but I am finally stuck on this (investlogin.php):
[code=php]
<!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″ />
<title>Testing – Investor Login</title>
</head>
<body>
<!–Disclaimer for John, to let him know this is a testing version or testing page–>
<p style=”font-family: arial; color:#666666; margin-top:20px;”>This page is still under testing.</p>
<!– Start of investor login –>
<table id=”container” width=”100%”>
<tr>
<td width=”20%”></td>
<td>
<div id=”main-content”>
<div id=”nav” style=”float: right; padding-top:30px;”>
<a href=”investlogin.php”><span>Investor Login</span></a>
<a href=”adminlogin.php”><span>Administrator Login</span></a>
<a href=”#”><span>Francais</span></a>
</div>
<div id=”logo”>
<img src=”images/logo.gif”>
</div>
<table id=”feature-cont” align=”center” width=”100%”>
<tr>
<td style=”background-color:#EEEEEE;”>
<span style=”font-family: Arial, Helvetica, sans-serif; color: black; font-size: 9px;”>>> <a href=”index.php”>HOME</a></span>
</td>
</tr>
<tr>
<td>
<h3 style=”font-family: Arial, Helvetica, sans-serif;”>Access AutoPlacement</h3>
<p style=”font-family: Arial, Helvetica, sans-serif; font-size: 11px; color:#333333; margin-top: -10px;”>Please enter your username and password in the fields below and click the Login button. For security purposes,
please ensure you exit the site by using the Log Out button in the top banner of the page.</p>
</td>
</tr>
<tr>
<td>
<div align=”center”>
<form action=”investor_access.php?username=”<?php print $DB_username; ?>”” method=”post”>
<table style=”font-family: Arial, Helvetica, sans-serif; font-size: 11px;”>
<tr>
<td align=”right”>
<span>Username: </span>
</td>
<td>
<input type=”text” name=”username” />
</td>
<td>
<select name=”language”>
<option>Choose Your Language</option>
<option value=”english”>English</option>
<option value=”french”>French</option>
</select>
</tr>
<tr>
<td align=”right”>
<span>Password: </span>
</td>
<td>
<input type=”password” name=”password” />
<input type=”hidden” name=”submit” />
</td>
</tr>
<tr>
<td>
<input name=”remember” type=”checkbox” value=”” /><span>Remember my Username</span>
</td>
<td>
<input type=”submit” value=”Submit” />
</tr>
<tr>
<td>
</td>
<td>
<img src=”images/icon_id_info.gif” /><a href=”#”><span>Forgot Your Password?</span></a>
</td>
</tr>
</table>
</form>
</div>
</td>
</tr>
</table>
</div>
</td>
<td width=”20%”></td>
</tr>
</table>
</body>
</html>
I was thinking that I could just make a variable called “$DB_username” meaning Database Username, where I could just call later on and link it to the Database. Thus being able to call the surname and given name, creating the full name. I am stuck on the fact that I now need something else to call up the database in order to get the username to submit to the the next page yadda yadda…
Is there something easier than this?