I am working on a new part of my site, where a user would log in, go to a page, then be able to select options from there.
I already have the login and main page working. My current issue is as follows:
On login, there are 4 fields from the database table that authenticates the user (firstname, lastname, number, id) that I have stored as session variables.
I need to have the information from these 4 fields put into the form that will be displayed for new record entry to identify who the record in the database comes from.
For some reason, I am drawing a major blank on this, (been 3 days now)....
:mad:
I just can't seem to remember how to make the session variables display in the form fields, so that when the record is submitted, it adds those 4 items to the database along with the rest of the data from the form.
Thanks in advance for any help.
Rob
here is part of the code for my form page. i know that the command goes into the value="" but i can't remember what the code is...
<?php
header("Expires: Sat, 01 Jan 2000 00:00:00 GMT");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: post-check=0, pre-check=0",false);
session_cache_limiter();
session_start();
require('config.php');
require('functions.php');
$constfname = $_SESSION['constfname'];
$constlname = $_SESSION['constlname'];
$constid = $_SESSION['constid'];
$constphnum = $_SESSION['constphnum'];
if (allow_access(Administrators) != "yes")
{
include ('no_access.html');
exit;
}
?>
CONST LAST NAME:
<input name="constlname" disabled type="text" id="constlname" value="" size="30" maxlength="30" onChange="javascript:this.value=this.value.toUpperCase();">
CONST FIRST NAME:
<input name="constfname" disabled type="text" id="constfname" value="" size="30" maxlength="30" onChange="javascript:this.value=this.value.toUpperCase();">
CONTACT NUMBER:
<input name="constphnum" disabled type="text" id="constphnum" value="" size="30" maxlength="30">
<input type="hidden" name="constid" size="7" maxlength="7" value="">