I have a logon screen that starts a session for several other pages and it 
has been working great, 
over the weekend something happened. I checked the site from home and 
after login the main
page would not load, just a white screen and view source showed absolutely 
nothing. Now I'm in the
office and looking at the source code and I don't see anything wrong, 
nothing changed. I can load the
pages by skipping the logon and typing in the complete url manually and 
they all load just fine, soon
as I try to use the logon screen the first main page after it will not 
load, if I enter the full url to another
protected page it will load, then I can use the links for the main page 
and it too will now load. Just after
the logon, the main page will not load. I have tried this with both my own 
login and a users login and
it is happening to all.
Any idea what could be causing this? I've gotta get this fixed ASAP, 
perminently, this is a business web
site. The code for the login screen and the main page are pasted below.
Chip Wiegand
Computer Services
Simrad, Inc

"There is no reason anyone would want a computer in their home."
     --Ken Olson, president, chairman and founder of Digital Equipment 
Corporation, 1977
 (They why do I have 9? Somebody help me!)
Code for authorization login:
include "../common_db.inc";
$register_script = "register.php";

function auth_user($userid, $userpassword) {
   global $default_dbname, $user_tablename;
   $link_id = db_connect($default_dbname);
   $query = "SELECT username FROM $user_tablename 
                             WHERE userid = '$userid' 
                             AND userpassword = '$userpassword'";
   $result = mysql_query($query);
   if(!mysql_num_rows($result)) return 0;
   else {
      $query_data = mysql_fetch_row($result);
      return $query_data[0];

function login_form() {
   global $PHP_SELF;
      <H3>Please log in to access the page you requested.</H3>
         <TD WIDTH="82%" NOWRAP>
            <INPUT TYPE="TEXT" NAME="userid" SIZE="8">
         <TH WIDTH="18%" ALIGN="RIGHT" NOWRAP>Password</TH>
         <TD WIDTH="82%" NOWRAP>
            <INPUT TYPE="PASSWORD" NAME="userpassword" SIZE="8">
            <INPUT TYPE="SUBMIT" VALUE="LOGIN" NAME="Submit">
if(!isset($userid)) {
else {
   session_register("userid", "userpassword");
   $username = auth_user($userid, $userpassword);
   if(!$username) {
      echo "<center><p>Authorization failed.<br>" .
           "Sorry, you must enter a valid userid and password combo.</p> " 
           "<p>This site is restricted to Simrad Authorized Dealers 
      echo "Click <a href=\"$PHP_SELF\">here</A> to try again.</p>";
      echo "<p>If you are a Simrad Authorized Dealer and \n";
                        echo "you are not a member yet,<br>please " .
           "call Simrad, Inc and request your login information.</p>\n";
      echo "<p>If you are not a Simrad Authorized Dealer please click on 
the<br> \n";
                        echo "following link to return to our home page 
                        echo "<a href=\"../index.php\">Simrad, 
  // else 
  // { 
    //echo "<p><a href=\"dealers_page.php\">Click here</a> to continue";
                //header( 'Location: dealers_page.php' ); 
  // } 

Code for the main page after the successful login:
include "auth_user.php";
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

<html xmlns="http://www.w3.org/1999/xhtml";>
    <? include "../connect";
       $sql = "select * from main where cat = 'dealers' and page = 
       $result = mysql_query($sql);
       while ($row=mysql_fetch_array($result))
       { printf("<title>%s</title>", $row["name"]); } 
    <meta name="generator" content="HTML Tidy, see www.w3.org" />
    <meta name="target"
    content="td, tda, tda157, 157, tda 157, tdc, tdc338, tdc 338, tdl, 
td-l, 1100, 1550, 1620, tb, tb548, tb 548, buoy, radio buoy, direction 
finder, df, addf" />
<? include "../metatags_pages.inc"; ?>
<style type="text/css">
td.small {font-size: 75%}
.red {color: red;
                  font-size: 75%; }
.black {color: black;
                          font-size: 75%; }
.big {font-size: 150% }
<!-- Code for Extreme Tracker -->
<a target="_top" href="http://t.extreme-dm.com/?login=sim100";>
<!-- <img src="http://u1.extreme-dm.com/i.gif"; height=38
border=0 width=41 alt="">-->&nbsp;</a><script 
</script><script language="javascript"><!--
EXd.write("<img src=\"http://t0.extreme-dm.com";,
"l="+escape(EXd.referrer)+"\" height=1 width=1>");//-->
</script><noscript><img height=1 width=1 alt=""

<div class="c1">
       <table width="90%" align="center" cellpadding="5"
      cellspacing="0" border="0"
      summary="Simrad Logo image with buttons to Index, Contact and 
          <td class="center" colspan="3">
                <img src="../topp2.jpg" border="0" />
         <br />
          <td class="center">&nbsp;</td>
          <td class="center"><a href="../index.php"
                        title="Click here to return to the Simrad, Inc 
home page">
          <img src="../home.gif" alt="" width="30"
          height="30" border="0" /></a></td>
          <td class="center">&nbsp;</td>
// Place the page title line from the database, with a gray background
$sql = "select * from main where cat = 'dealers' and page = 'dealers'";
$result = mysql_query($sql);
while ($row=mysql_fetch_array($result))
print "<table border=0 align=center width=90%><tr><td>";
printf("<p class=\"title\">%s</p>", $row["name"]);
print "</td></tr></table>"; } 
<table summary="Body of the index page" width="90%" border="0" 
<table width="200" summary="Product Menu" border="0" align="center">
<tr><td class="menu" cellpadding="0" cellspacing="0">
// create the product menu from the database 
$sql = "select * from main where cat = 'dealers' and id >= 118 order by 
$result = mysql_query($sql);
while ( $row = mysql_fetch_array($result))
printf("<a href='%s?id=$row[id]'>%s</a><br />", $row["page"], 
<table width="200" summary="Seperator" align="center">
<br /><hr /><br />
<? include "../secondary-main-sql.inc" ?>
<table width="200" summary="Seperator" align="center">
<br /><hr /><br />
<? include "../secondary-menu-sql.inc" ?>
            <table width="100%" border="0" cellpadding="20"
            cellspacing="0" align="center"
            summary="Welcome to Simrad, Inc.">
               <td class="small" width="50%">
class="big">W</span>elcome to the Simrad Authorized Dealers web pages. 
Here you will be able to 
                                                         connect to the 
eBusiness Manager web site, read Dealer Bulletins, and more as we 
                                                         continue to build 
this section of our web site. Please feel free to contact us 
                                                         with suggestions 
for what you would like to see in this section.
class="big">N</span>avigating this Site: at the top of each page is an 
'up-arrow', this will bring you back to the Dealers
                                                         Site home page, 
with the exception of the forums - click on the Simrad logo at the top of
                                                         the page to 
return. In the chat room click on Leave Chat.</p>
                                                         <li>These web 
pages have been tested in browsers of versions 5.x or newer.
                                                         They have tested 
in Opera 5 and 6, Netscape 6 and 7, Mozilla 1 and 1.1, and IE 5.5 and 6.
                                                         If you are using 
a 4.x browser please upgrade it to the latest version. (The pages don't
                                                         display properly 
in the older browsers). These pages are all designed for best viewing
                                                         at a screen 
resolution of 800x600 or higher.</li>  
                                                         <li>The original 
Dealer Bulletin mentioned there would be manuals to download, but
                                                         it turns out that 
we are not allowed to put service manuals on the web. This leaves all
                                                         other manuals - 
installation, operators, instruction, etc - available on the regular Tech
                                                         Support and FAQ's 
page on the main web site menu.</li>
                                                         <li>If you click 
on a link in the lower two sections of the menu you will have to use
                                                         your browsers 
back button to return to these pages. Or click on the Dealers Only link 
                                                         may require 
another login, depending on browser and browser version).</li>  
width="50%" bgcolor="#e5d879">
class="red">Dealer Bulletins</span><br /><span class="black"> - You can 
read all 
                                                                the Simrad 
Dealer Bulletins published since January 2001 online. They can be sorted 
                                                                author or 
date. And when printed look just like the mailed Dealer 
class="red">eBusiness Manager</span><br /><span class="black"> - You can 
and sales orders status, product availability, view sales order history 
and check
credit status - all online!</span></p> 
class="red">Logos</span><br /><span class="black"> - We have our 
authorized Simrad
available in several formats and sizes, just right-click the one you want 
and save it.
                                                                If you 
need one in a differant format please <a href="../contact.php">contact the 
class="red">Info</span><br /><span class="black"> - This page will contain 
downloads specificly useful in your daily business. We have our price book 
available for 
and will add more items as needed.</span></p> 
class="red">Forums</span><br /><span class="black"> - Forums are a place 
for discussions.
                                                                You could 
use these for exchanging information about Simrad products, ask questions 
that others may
                                                                be able to 
help you with, post 'want-ads' (looking for a part for a customer but 
can't find it? Maybe
Simrad dealer can help).</span></p> 
class="red">Chat Room</span><br /><span class="black"> - Who doesn't like 
to chat, right?
                                                                Here is a 
place you can go to chat with Simrad dealers from across the country, no 
long distance
calls to make. Just remember, this is not an Instant Messenger type chat, 
it is a chat room,
                                                                so you'll 
be able to chat with others who are in the chat room also. There is a 
complete help file
please read it to get familiar with all the options of the chat 
class="red">Refurbished Products</span><br /> <span class="black"> - Now 
we have given you 
                                                                a list of 
all the refurbished products we have available. This should make it easier 
for you to sell
items at discounted prices to customers who may otherwise choose a less 
expensive brand. Please
Simrad Sales for pricing information.</span></p> 
      <? include "../footer.inc" ?>

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to