Uploading Excel files and then showing them as a link

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ninja2222
Forum Newbie
Posts: 17
Joined: Wed Jun 18, 2008 1:42 pm

Uploading Excel files and then showing them as a link

Post by ninja2222 »

I want to make an employee page where the staff can upload reports to a client's(user) information in a the database. Then I would like this data to be shown on the accounts(users page) as
a link to this newly uploaded file. How can I make this possible. Please help!!!sd :banghead:
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Uploading Excel files and then showing them as a link

Post by Benjamin »

What have you tried, where is your code, and where are you stuck?
ninja2222
Forum Newbie
Posts: 17
Joined: Wed Jun 18, 2008 1:42 pm

Re: Uploading Excel files and then showing them as a link

Post by ninja2222 »

I'LL SHOOTIT TO YOU RIGHT NOW.

How do post the code again?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Re: Uploading Excel files and then showing them as a link

Post by Benjamin »

Just create tags like this, without spaces..

[ code=php ]

[ /code ]

and paste your code between them.
ninja2222
Forum Newbie
Posts: 17
Joined: Wed Jun 18, 2008 1:42 pm

Re: Uploading Excel files and then showing them as a link

Post by ninja2222 »

this is the login page

Code: Select all

 
<?php require_once('Connections/connex.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$colname_Recordset1 = "-1";
if (isset($_SESSION['username'])) {
  $colname_Recordset1 = $_SESSION['username'];
}
mysql_select_db($database_connex, $connex);
$query_Recordset1 = sprintf("SELECT * FROM customerup WHERE username = %s", GetSQLValueString($colname_Recordset1, "text"));
$Recordset1 = mysql_query($query_Recordset1, $connex) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
  session_start();
}
 
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
  $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}
 
if (isset($_POST['username2'])) {
  $loginUsername=$_POST['username2'];
  $password=$_POST['password2'];
  $MM_fldUserAuthorization = "username";
  $MM_redirectLoginSuccess = "accounts.php";
  $MM_redirectLoginFailed = "adminlogin.php?failed=true";
  $MM_redirecttoReferrer = false;
  mysql_select_db($database_connex, $connex);
    
  $LoginRS__query=sprintf("SELECT username, password, username FROM customerup WHERE username=%s AND password=%s",
  GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); 
   
  $LoginRS = mysql_query($LoginRS__query, $connex) or die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {
    
    $loginStrGroup  = mysql_result($LoginRS,0,'username');
    
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;       
 
    if (isset($_SESSION['PrevUrl']) && false) {
      $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];  
    }
    header("Location: " . $MM_redirectLoginSuccess );
  }
  else {
    header("Location: ". $MM_redirectLoginFailed );
  }
}
?><!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>adminloginpage</title>
<style type="text/css">
<!--
body,td,th {
    font-family: Arial Black, Arial, sans-serif;
    font-size: medium;
    color: #FFFFFF;
}
body {
    background-color: #000066;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
#container {
    background-color: #000066;
    width: 780px;
    margin-right: auto;
    margin-left: auto;
    border: thin solid #333333;
}
#container #top {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: larger;
    font-style: oblique;
    font-weight: bolder;
    font-variant: small-caps;
    color: #FF0000;
    background-color: #FFFFFF;
    border: thick solid #313031;
    width: 770px;
}
.style1 {color: #FF0000}
a {
    font-family: Arial Black, Arial, sans-serif;
    font-size: medium;
    color: #FFFF00;
}
#nav {
    background-color: #333333;
    text-align: center;
    padding: 10px;
    border: thin solid #000000;
}
#nav ul {
    margin: 0px;
    padding: 0px;
}
#nav li {
    list-style-type: none;
    display: inline;
    margin-right: 10px;
    margin-left: 10px;
}
#nav a {
    font-size: 90%;
    text-decoration: none;
}
#nav a:hover {
    color: #FF0000;
    font-size: 90%;
    text-decoration: none;
}
#container #footer {
    height: auto;
    background-color: #333333;
}
#lower_links ul {
    margin: 0px;
    padding: 0px;
}
#lower_links li {
    list-style-type: none;
    display: inline;
    margin-right: 10px;
    margin-left: 10px;
}
#lower_links a {
    font-size: 90%;
    text-decoration: none;
}
#lower_links a:hover {
    color: #FF0000;
    font-size: 90%;
    text-decoration: none;
}
#form1 table {
    background-color: #313031;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-right-color: #000000;
    border-bottom-color: #000000;
    border-left-color: #000000;
}
#logtable {
    background-color: #313031;
}
pad {
    padding-bottom: 3px;
    padding-left: 2px;
}
#log-in {
    padding: 0px;
    width: 229px;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 20px;
    float: right;
}
#top h1 {
    background-color: #FFFFFF;
    width: 760px;
    border-top-color: #FFFFFF;
    border-right-color: #FFFFFF;
    border-bottom-color: #FFFFFF;
    border-left-color: #FFFFFF;
}
.style4 {
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #FFFF00;
}
.style5 {color: #FFFF00}
.style6 {color: #FFFFFF}
.style9 {color: #FFFF00; font-style: italic; }
.style11 {color: #FF0000; font-style: italic; }
.style12 {font-size: small}
#errormssg {
    font-family: "Times New Roman", Times, serif;
    font-size: medium;
    font-style: oblique;
    font-weight: bolder;
    color: #FF0000;
    text-decoration: underline;
    width: 250px;
    float: right;
}
.style14 {color: #FFFF00; font-style: italic; font-family: Georgia, "Times New Roman", Times, serif; }
-->
</style>
</head>
<div id="container">
  <div align="left"><img src="images/ALM.gif" alt="A-LINE MESSENGER SERVICE-THE PROFESSIONAL MESSENGER LOGO" name="top" width="780" height="65" id="top" longdesc="images/ALM.gif" /></div>
  <div id="nav">
    <ul>
      <li><a href="/index.html">Home</a></li>
      <li><a href="/about_us.html">About Us</a></li>
      <li><a href="/delivery_services.html">Services</a></li>
      <li><a href="/on_line_order.html">Order Desk</a></li>
      <li><a href="adminlogin.php">Tracking/Reports</a></li>
      <li><a href="/contact_us.html">Contact Us</a></li>
      <li><a href="/links.html">Links</a></li>
    </ul>
  </div>
  <div align="center" id="log-in">
    <form action="<?php echo $loginFormAction; ?>" id="form1" name="form1" method="POST">
      <div align="right">
        <table width="228" border="0" cellpadding="0" id="logtable">
          <tr>
            <td width="128" bordercolor="#FFFFFF"><div align="right" class="style12">USER NAME:</div></td>
            <td width="90" bordercolor="#FFFFFF" id="form2"><span class="style12">
              <label>
              <input name="username2" type="text" id="username2" size="15" />
              </label>
            </span></td>
          </tr>
          <tr>
            <td bordercolor="#FFFFFF" id="form2"><div align="right" class="style12">PASSWORD:</div></td>
            <td bordercolor="#FFFFFF" id="form2"><span class="style12">
              <label>
              <input name="password2" type="password" id="password2" size="15" />
              </label>
            </span></td>
          </tr>
          <tr>
            <td bordercolor="#FFFFFF" id="form2"><div align="right"><span class="style12"><span class="style12"></span></span></div></td>
            <td bordercolor="#FFFFFF" class="style12" id="form2"><label> </label>
                <div align="right">
                  <input type="submit" name="login2" id="login2" value="ENTER" />
              </div></td>
          </tr>
        </table>
      </div>
    </form>
  </div>
  <div id="body">
    <h2 align="right"><span class="style14">TRACKING & REPORTS</span></h2>
    <h3 align="right"><span class="style5"><em><strong><br />
      <br />
      </strong></em></span></h3>
    <div id="errormssg">
      <div align="right"><?php echo (isset($_GET['failed']))?'<p class="error">Log
In failed - Please try again.</p>':''; ?></div>
    </div>
    <h3 align="center"><span class="style9"><br />
    CLICK HERE FOR A DEMO</span></h3>
<div align="center">
        <h3><a href="demo_report.xls" class="style11">DEMO REPORTS</a><br />
        </h3>
    </div>
      <blockquote>
        <p align="left">All  services can be provided  by Phone, Fax, and On-Line by our friendly<br />
          professional dispatching and order taking specialists. &nbsp;If you prefer to<br />
          check your account on-line, the following services can be provided for<br />
          you upon request.&nbsp;&nbsp;Give us a call to set up a new user name and<br />
          password.</p>
    </blockquote>
    <p align="left">&nbsp;</p>
      <h3 align="center" class="style5"><em><strong>TRACKING: ROUTES  & SPECIALS</strong></em></h3>
    <p>&nbsp;</p>
      <blockquote>
        <p>Our on-line tracking allows the customer to monitor  deliveries.  This<br />
        report will show:</p>
        <ul>
          <li>Order       number</li>
          <li>Date       and time of service</li>
          <li>Pickup ETA / Delivery ETA</li>
          <li> Pickup contact & signer, organization name, city, zip code, and time</li>
          <li>Delivery       contact & signer, organization name, city, zip code, and ETA</li>
          <li>Delivery       time(uploaded as soon as the driver calls in at delivery)</li>
        </ul>
    </blockquote>
      <p>&nbsp;</p>
      <h3 align="center" class="style5"><em><strong>INTERIM / CURRENT ACCOUNT REPORT</strong></em></h3>
      <p>&nbsp;</p>
      <blockquote>
        <p align="left">A-LINE MESSENGER SERVICE realizes that it can be just as  important to<br />
          keep track of budgeting as well as service.  In direct response to this<br />
          need we have  instituted the Interim/Current Account Report.<br />
          This report will include:</p>
        <ul>
          <li>Order       number</li>
          <li>Pickup       name, organization name, city, zip, and time</li>
          <li>Delivery       name, organization name, city, zip, and time</li>
          <li>Order price,       subtotal by reference(ie: account number, department<br />
            name, and job number), and total to date<br />
          </li>
        </ul>
      </blockquote>
      
    <ul type="disc">
    </ul>
      <h3 align="center" class="style5"><strong><em>SERVICE REPORT</em></strong></h3>
    <p>&nbsp;</p>
      <blockquote>
        <p>Our service reports are a great way to verify the type of A+  service that<br />
          we provide day after day.  We have an on-time record of 99.3 % and are<br />
          always striving towards improvement.   This record is the product of our<br />
          main belief
          that nothing is more important than the dependability of<br />
          always being on time.  This report includes:</p>
        <ul>
          <li>Order       number</li>
          <li>Service       Type</li>
          <li>Reference       number</li>
          <li>Price of the order and whether it is chargeable or not</li>
          <li>Date       and time of service</li>
          <li>Ready       date and time</li>
          <li>Pickup       name, organization name, city, zip, code, and time</li>
          <li>Deliver-by       date and time</li>
          <li>Delivery       signer, organization name, city, zip code, signature, and time</li>
        </ul>
      </blockquote>
      <p><br />
      </p>
      
  </div>
  <p align="center"></p>
 
<div id="footer"><div id="nav">
    <ul>
      <li><a href="/index.html">Home</a></li>
      <li><a href="/about_us.html">About Us</a></li>
      <li><a href="/delivery_services.html">Services</a></li>
      <li><a href="/on_line_order.html">Order Desk</a></li>
      <li><a href="adminlogin.php">Tracking/Reports</a></li>
      <li><a href="/contact_us.html">Contact Us</a></li>
      <li><a href="/links.html">Links</a></li>
    </ul>
  </div>
  <!--end of the footer div -->
  </div>
  <h4 align="center"><em><span class="style1">A-LINE MESSENGER SERVICE </span></em><em>- </em><span class="style6"> <em> 2 - DELIVER - 4 - YOU</em></span></h4>
</div>
</div>
<!--this is the close of the container div-->
<?php
mysql_free_result($Recordset1);
?>
 
 

and this is the accounts page

Code: Select all

 
<?php require_once('Connections/connex.php'); ?>
<?php
//initialize the session
session_start();
 
// ** Logout the current user. **
$logoutAction = $HTTP_SERVER_VARS['PHP_SELF']."?doLogout=true";
if ((isset($HTTP_SERVER_VARS['QUERY_STRING'])) && ($HTTP_SERVER_VARS['QUERY_STRING'] != "")){
  $logoutAction .="&". $HTTP_SERVER_VARS['QUERY_STRING'];
}
 
if ((isset($HTTP_GET_VARS['doLogout'])) &&($HTTP_GET_VARS['doLogout']=="true")){
  //to fully log out a visitor we need to clear the session varialbles
  session_unregister('MM_Username');
  session_unregister('MM_UserGroup');
    
  $logoutGoTo = "adminlogin.php";
  if ($logoutGoTo) {
    header("Location: $logoutGoTo");
    exit;
  }
}
?>
<?php
if (!isset($_SESSION)) {
  session_start();
}
$MM_authorizedUsers = "";
$MM_donotCheckaccess = "true";
 
// *** Restrict Access To Page: Grant or deny access to this page
function isAuthorized($strUsers, $strGroups, $UserName, $UserGroup) { 
  // For security, start by assuming the visitor is NOT authorized. 
  $isValid = False; 
 
  // When a visitor has logged into this site, the Session variable MM_Username set equal to their username. 
  // Therefore, we know that a user is NOT logged in if that Session variable is blank. 
  if (!empty($UserName)) { 
    // Besides being logged in, you may restrict access to only certain users based on an ID established when they login. 
    // Parse the strings into arrays. 
    $arrUsers = Explode(",", $strUsers); 
    $arrGroups = Explode(",", $strGroups); 
    if (in_array($UserName, $arrUsers)) { 
      $isValid = true; 
    } 
    // Or, you may restrict access to only certain users based on their username. 
    if (in_array($UserGroup, $arrGroups)) { 
      $isValid = true; 
    } 
    if (($strUsers == "") && true) { 
      $isValid = true; 
    } 
  } 
  return $isValid; 
}
 
$MM_restrictGoTo = "adminlogin.php";
if (!((isset($_SESSION['MM_Username'])) && (isAuthorized("",$MM_authorizedUsers, $_SESSION['MM_Username'], $_SESSION['MM_UserGroup'])))) {   
  $MM_qsChar = "?";
  $MM_referrer = $_SERVER['PHP_SELF'];
  if (strpos($MM_restrictGoTo, "?")) $MM_qsChar = "&";
  if (isset($QUERY_STRING) && strlen($QUERY_STRING) > 0) 
  $MM_referrer .= "?" . $QUERY_STRING;
  $MM_restrictGoTo = $MM_restrictGoTo. $MM_qsChar . "accesscheck=" . urlencode($MM_referrer);
  header("Location: ". $MM_restrictGoTo); 
  exit;
}
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
 
  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
 
  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
 
$colname_username = "-1";
if (isset($_SESSION['MM_Username'])) {
  $colname_username = $_SESSION['MM_Username'];
}
mysql_select_db($database_connex, $connex);
$query_username = sprintf("SELECT * FROM customerup WHERE username = %s", GetSQLValueString($colname_username, "text"));
$username = mysql_query($query_username, $connex) or die(mysql_error());
$row_username = mysql_fetch_assoc($username);
$totalRows_username = mysql_num_rows($username);
?><!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>A-LINE MESSENGER SERVICE UCLA ETA AND ROUTE TRACKING</title>
<script type="text/javascript">
function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;
 
      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
<style type="text/css">
<!--
body,td,th {
    font-family: Arial Black, Arial, sans-serif;
    font-size: medium;
    color: #FFFFFF;
}
body {
    background-color: #000066;
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
}
#container {
    background-color: #000066;
    width: 780px;
    margin-right: auto;
    margin-left: auto;
    border: thin solid #333333;
}
.style1 {color: #FF0000}
#container #top {
    font-family: "Arial Black", Arial, sans-serif;
    font-size: larger;
    font-style: oblique;
    font-weight: bolder;
    font-variant: small-caps;
    color: #FF0000;
    background-color: #FFFFFF;
    border: thick solid #313031;
    width: 770px;
}
a {
    font-family: Arial Black, Arial, sans-serif;
    font-size: medium;
    color: #FFFF00;
}
#nav {
    background-color: #333333;
    text-align: center;
    padding: 10px;
    border: thin solid #000000;
}
#form1 table {
    background-color: #313031;
    border: thin solid #000000;
}
#nav ul {
    margin: 0px;
    padding: 0px;
}
#nav li {
    list-style-type: none;
    display: inline;
    margin-right: 10px;
    margin-left: 10px;
}
#nav a {
    font-size: 90%;
    text-decoration: none;
}
#nav a:hover {
    color: #FF0000;
    font-size: 90%;
    text-decoration: none;
}
#container #footer {
    height: auto;
    background-color: #333333;
}
#lower_links ul {
    margin: 0px;
    padding: 0px;
}
#lower_links li {
    list-style-type: none;
    display: inline;
    margin-right: 10px;
    margin-left: 10px;
}
#lower_links a {
    font-size: 90%;
    text-decoration: none;
}
#lower_links a:hover {
    color: #FF0000;
    font-size: 90%;
    text-decoration: none;
}
.style2 {
    font-family: Georgia, "Times New Roman", Times, serif;
    color: #FFFF00;
    font-style: italic;
}
.style3 {
    color: #FFFFFF;
    font-style: italic;
}
.style12 {font-size: small}
#log-in {   padding: 0px;
    width: 229px;
    margin-top: 0px;
    margin-bottom: 0px;
    margin-left: 20px;
    float: right;
}
#logtable {
    background-color: #313031;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    border-right-style: solid;
    border-bottom-style: solid;
    border-left-style: solid;
    border-right-color: #000000;
    border-bottom-color: #000000;
    border-left-color: #000000;
}
.style13 {color: #FFFF00}
#customername {
    font-family: Arial, Helvetica, sans-serif;
    font-size: x-large;
    color: #FF0000;
}
-->
</style>
</head>
 
 
<div id="container"><img src="images/ALM.gif" width="780" height="65" id="top" />
<div id="nav">
    <ul>
      <li><a href="/index.html">Home</a></li>
      <li><a href="/about_us.html">About Us</a></li>
      <li><a href="/delivery_services.html">Services</a></li>
      <li><a href="/on_line_order.html">Place Order</a></li>
      <li><a href="adminlogin.php">Tracking/Reports</a></li>
      <li><a href="/contact_us.html">Contact Us</a></li>
      <li><a href="/links.html">Links</a></li>
    </ul>
  </div>
  <div align="center" id="log-in">
    
    <div align="right">
<table width="228" border="0" cellpadding="0" id="logtable">
          <tr>
            <td height="68" colspan="2" bordercolor="#FFFFFF" id="form2"><span class="style12">
              <label></label>
                          </span>
              <span class="style12"></span>
              <label> </label>
              <div align="center">
                <p><span class="style13">Logged In</span><br />
                  <a href="<?php echo $logoutAction ?>" class="style12">Log out</a></p>
            </div></td>
          </tr>
        </table>
      </div>
      </div>
  <div id="body">
  
    <h2 align="right"><span class="style2">TRACKING & REPORTS</span></h2>
    <h3 align="center"><br />
      <br />
    </h3>
    
    <?php if ($totalRows_username > 0) { // Show if recordset not empty ?>
      <div id="customername">
        <div align="center">
          <h3><?php echo $row_username['menu_name']; ?></h3>
        </div>
      </div>
      <?php } // Show if recordset not empty ?>
    <h3 align="center"><br />
      <br />
      <span class="style13"><em>CUSTOMER ACCOUNT FILES</em></span></h3>
    <h3 align="center"><br />
    </h3>    
    
    <?php if ($totalRows_username > 0) { // Show if recordset not empty ?>
      <div class="style13" id="customlinks">        &nbsp;
        <div align="center"><?php echo $row_username['customlinks']; ?></div>
      </div>
      <?php } // Show if recordset not empty ?>
  </div>
  <div id="footer"><div id="nav">
 
    <ul>
      <li><a href="/index.html">Home</a></li>
      <li><a href="/about_us.html">About Us</a></li>
      <li><a href="/delivery_services.html">Services</a></li>
      <li><a href="/on_line_order.html">Place Order</a></li>
      <li><a href="adminlogin.php">Tracking/Reports</a></li>
      <li><a href="/contact_us.html">Contact Us</a></li>
      <li><a href="/links.html">Links</a></li>
      </ul>
  </div>
    <!--end of the footer div -->
  </div>
  <h4 align="center"><em><span class="style1">A-LINE MESSENGER SERVICE </span></em><span class="style3">- 2 - DELIVER - 4 - YOU</span><em>!</em></h4>
</div>
<!--this is the close of the container div-->
</body>
<?php
mysql_free_result($username);
?>
 
Also when the 'log-out' link is clicked the user is not directed back to the loging page, how do I redirect the user properly.
Post Reply