Jump to content

Clinton

Members
  • Posts

    337
  • Joined

  • Last visited

Posts posted by Clinton

  1. I do.

     

    My Code is:

     

    <?

    $db=mysql_connect ("localhost", "", "") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rn=("SELECT Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rz=mysql_query($rn);

     

    while($row=mysql_fetch_array($rz))

    {

    if($row["Status"]=="0"){

    echo;("The Administrator has not yet approved your account. You will be notified when this occurs");

    }else{

    ?>

     

    HTML HERE

     

    <?

    }

    ?>

     

    And I am still getting that error

  2. And then where do I put my ending curly bracket? I put it at the very end so it's like

     

    <?

    }

    ?>

     

    but then I get the error:

     

    Parse error: syntax error, unexpected $end in /home/anderse/public_html/NAIS/8321/inc/nav.php on line 198

     

    <?

    $db=mysql_connect ("localhost", "anderse_admin", "2006*Cj*") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rn=("SELECT Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rz=mysql_query($rn);

     

    while($row=mysql_fetch_array($rz))

    {

    if($row["Status"]=="0"){

    echo;("The Administrator has not yet approved your account. You will be notified when this occurs");

    }else{

    ?>

     

     

     

     

    <html>

     

    <head>

     

    <META http-equiv="REFRESH" content="60"; url="nav.php">

     

    <SCRIPT TYPE="text/javascript">

    <!--

    function popup(mylink, windowname)

    {

    if (! window.focus)return true;

    var href;

    if (typeof(mylink) == 'string')

     

    href=mylink;

    else

    href=mylink.href;

    window.open(href, windowname, 'width=600,height=300,scrollbars=yes');

    return false;

    }

    //-->

    </SCRIPT>

     

    </head>

     

    <center>

     

    <?

    $dbh=mysql_connect ("localhost", "anderse_admin", "2006*Cj*") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rnq=("SELECT First,MI,Last,Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rs=mysql_query($rnq);

     

    while( $row = mysql_fetch_array($rs))

    {

    echo("<h3>".$row["First"]);

    echo(" ".$row["MI"]);

    echo(". ".$row["Last"]);

    echo("</h3> ");

     

    }

    ?>

     

    <?

    $ztime = date("H:i d-M-y", strtotime("now + 6 hour"));

    $ptime = date("H:i d-M-y", strtotime("now -3 hour"));

    $mtime = date("H:i d-M-y", strtotime("now -2 hour"));

    $ctime = date("H:i d-M-y", strtotime("now -1 hour"));

    $atime = date("H:i d-M-y");

     

    ?>

     

    <body bgcolor="#3366FF" text="#99FF00" link="#00FF99" vlink="#00FF99" alink="#00FF99">

     

    <h5><font color=green>Pacific Time: </font><? echo $ptime;?>

    <? echo "<font color=#FFCC33>&nbsp&nbsp Mountain Time: </font>",$mtime;?>

    <? echo "<font color=green>&nbsp&nbsp Central Time: </font>",$ctime;?>

    <? echo "<font color=green>&nbsp&nbsp Atlantic Time: </font>",$atime;?>

    <? echo "<font color=green>&nbsp&nbsp Zulu Time: </font>",$ztime;?><br>

    <? echo "<font color=green>3350 Directors Row, Suite 600 &nbsp &nbsp Salt Lake City, UT &nbsp &nbsp 84104-4585 &nbsp &nbsp Office: 801-908-5350 &nbsp &nbsp &nbsp Fax: 866-636-2629<br>";?></font></h5>

    </center>

     

     

     

    <style>

    <!--

    .skin0{

    position:absolute;

    width:165px;

    border:1px solid red;

    background-color:menu;

    font-family:Verdana;

    line-height:20px;

    cursor:default;

    font-size:14px;

    z-index:100;

    visibility:hidden;

    }

     

    .menuitems{

    padding-left:10px;

    padding-right:10px;

    }

    -->

    </style>

     

     

     

    <div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>

    <div class="menuitems" url="index.php">Home</div>

    <div class="menuitems" url="keyper.php">Personnel</div>

    <div class="menuitems" url="calendar.php">Calendar</div>

    <div class="menuitems" url="inventory.php">Inventory</a></div>

    <div class="menuitems" url="hotels.php">D.B. Hotels</a></div>

    <div class="menuitems" url="options.php">Edit Personal Info</div>

    <div class="menuitems" url="admin.php">Admin Area</div>

    <div class="menuitems" url="logout.php">Logout</div>

    </div>

     

    <script language="JavaScript1.2">

     

    var display_url=0

     

    var ie5=document.all&&document.getElementById

    var ns6=document.getElementById&&!document.all

    if (ie5||ns6)

    var menuobj=document.getElementById("ie5menu")

     

    function showmenuie5(e){

     

    var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX

    var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY

     

    if (rightedge<menuobj.offsetWidth)

     

    menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth

    else

     

    menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX

     

    if (bottomedge<menuobj.offsetHeight)

    menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight

    else

    menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY

     

    menuobj.style.visibility="visible"

    return false

    }

     

    function hidemenuie5(e){

    menuobj.style.visibility="hidden"

    }

     

    function highlightie5(e){

    var firingobj=ie5? event.srcElement : e.target

    if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){

    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node

    firingobj.style.backgroundColor="highlight"

    firingobj.style.color="yellow"

    if (display_url==1)

    window.status=event.srcElement.url

    }

    }

     

    function lowlightie5(e){

    var firingobj=ie5? event.srcElement : e.target

    if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){

    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node

    firingobj.style.backgroundColor="#3366FF"

    firingobj.style.color="#99FF00"

    window.status=''

    }

    }

     

    function jumptoie5(e){

    var firingobj=ie5? event.srcElement : e.target

    if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){

    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode

    if (firingobj.getAttribute("target"))

    window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target"))

    else

    window.location=firingobj.getAttribute("url")

    }

    }

     

    if (ie5||ns6){

    menuobj.style.display=''

    document.oncontextmenu=showmenuie5

    document.onclick=hidemenuie5

    }

     

    </script>

     

    <?

    }

    ?>

     

    So I took it out and the error then focuses on the "</script>" giving the same unexpected end error.

  3. Ok, so I got rid of the second echo and it worked to a point. It now includes the statement, "The Administrator has not yet approved your account. You will be contacted once this occurs." If the account status equals 0 but it also shows the rest of the website, which is not what I want. I want it to show that phrase if their account has not been approved and that's it. It's like the else phrase isn't working.

     

    (I just joined this site and it's awesome. I can't believe how fast responses are here. Thanks!)

  4. That fixed that problem but now it's giving me a problem in the HTML area... it's like the php hasn't ended and the problem is with a ;??

     

    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/anderse/public_html/NAIS/8321/inc/nav.php on line 25

     

    (By the way, thanks for the quick help)

     

    <?

    $db=mysql_connect ("localhost", "anderse_admin", "2006*Cj*") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rn=("SELECT Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rz=mysql_query($rn);

     

    while( $row = mysql_fetch_array($rz))

    {

    if($row["Status"]=="0")

    echo ("The Administrator has not yet approved your account. You will be contacted once this occurs.");

    else

    echo "

    ?>

     

     

     

     

    <html>

     

    <head>

     

    <META http-equiv="REFRESH" content="60"; url="nav.php">

     

    <SCRIPT TYPE="text/javascript">

    <!--

    function popup(mylink, windowname)

    {

    if (! window.focus)return true;

    var href;

    if (typeof(mylink) == 'string')

     

    href=mylink;

    else

    href=mylink.href;

    window.open(href, windowname, 'width=600,height=300,scrollbars=yes');

    return false;

    }

    //-->

    </SCRIPT>

     

    </head>

     

    <center>

     

    <?

    $dbh=mysql_connect ("localhost", "anderse_admin", "2006*Cj*") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rnq=("SELECT First,MI,Last,Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rs=mysql_query($rnq);

     

    while( $row = mysql_fetch_array($rs))

    {

    echo("<h3>".$row["First"]);

    echo(" ".$row["MI"]);

    echo(". ".$row["Last"]);

    echo("</h3> ");

     

    }

    ?>

     

    <?

    $ztime = date("H:i d-M-y", strtotime("now + 6 hour"));

    $ptime = date("H:i d-M-y", strtotime("now -3 hour"));

    $mtime = date("H:i d-M-y", strtotime("now -2 hour"));

    $ctime = date("H:i d-M-y", strtotime("now -1 hour"));

    $atime = date("H:i d-M-y");

     

    ?>

     

    <body bgcolor="#3366FF" text="#99FF00" link="#00FF99" vlink="#00FF99" alink="#00FF99">

     

    <h5><font color=green>Pacific Time: </font><? echo $ptime;?>

    <? echo "<font color=#FFCC33>&nbsp&nbsp Mountain Time: </font>",$mtime;?>

    <? echo "<font color=green>&nbsp&nbsp Central Time: </font>",$ctime;?>

    <? echo "<font color=green>&nbsp&nbsp Atlantic Time: </font>",$atime;?>

    <? echo "<font color=green>&nbsp&nbsp Zulu Time: </font>",$ztime;?><br>

    <? echo "<font color=green>3350 Directors Row, Suite 600 &nbsp &nbsp Salt Lake City, UT &nbsp &nbsp 84104-4585 &nbsp &nbsp Office: 801-908-5350 &nbsp &nbsp &nbsp Fax: 866-636-2629<br>";?></font></h5>

    </center>

     

     

     

    <style>

    <!--

    .skin0{

    position:absolute;

    width:165px;

    border:1px solid red;

    background-color:menu;

    font-family:Verdana;

    line-height:20px;

    cursor:default;

    font-size:14px;

    z-index:100;

    visibility:hidden;

    }

     

    .menuitems{

    padding-left:10px;

    padding-right:10px;

    }

    -->

    </style>

     

     

     

    <div id="ie5menu" class="skin0" onMouseover="highlightie5(event)" onMouseout="lowlightie5(event)" onClick="jumptoie5(event)" display:none>

    <div class="menuitems" url="index.php">Home</div>

    <div class="menuitems" url="keyper.php">Personnel</div>

    <div class="menuitems" url="calendar.php">Calendar</div>

    <div class="menuitems" url="inventory.php">Inventory</a></div>

    <div class="menuitems" url="hotels.php">D.B. Hotels</a></div>

    <div class="menuitems" url="options.php">Edit Personal Info</div>

    <div class="menuitems" url="admin.php">Admin Area</div>

    <div class="menuitems" url="logout.php">Logout</div>

    </div>

     

    <script language="JavaScript1.2">

     

    var display_url=0

     

    var ie5=document.all&&document.getElementById

    var ns6=document.getElementById&&!document.all

    if (ie5||ns6)

    var menuobj=document.getElementById("ie5menu")

     

    function showmenuie5(e){

     

    var rightedge=ie5? document.body.clientWidth-event.clientX : window.innerWidth-e.clientX

    var bottomedge=ie5? document.body.clientHeight-event.clientY : window.innerHeight-e.clientY

     

    if (rightedge<menuobj.offsetWidth)

     

    menuobj.style.left=ie5? document.body.scrollLeft+event.clientX-menuobj.offsetWidth : window.pageXOffset+e.clientX-menuobj.offsetWidth

    else

     

    menuobj.style.left=ie5? document.body.scrollLeft+event.clientX : window.pageXOffset+e.clientX

     

    if (bottomedge<menuobj.offsetHeight)

    menuobj.style.top=ie5? document.body.scrollTop+event.clientY-menuobj.offsetHeight : window.pageYOffset+e.clientY-menuobj.offsetHeight

    else

    menuobj.style.top=ie5? document.body.scrollTop+event.clientY : window.pageYOffset+e.clientY

     

    menuobj.style.visibility="visible"

    return false

    }

     

    function hidemenuie5(e){

    menuobj.style.visibility="hidden"

    }

     

    function highlightie5(e){

    var firingobj=ie5? event.srcElement : e.target

    if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){

    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node

    firingobj.style.backgroundColor="highlight"

    firingobj.style.color="yellow"

    if (display_url==1)

    window.status=event.srcElement.url

    }

    }

     

    function lowlightie5(e){

    var firingobj=ie5? event.srcElement : e.target

    if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){

    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode //up one node

    firingobj.style.backgroundColor="#3366FF"

    firingobj.style.color="#99FF00"

    window.status=''

    }

    }

     

    function jumptoie5(e){

    var firingobj=ie5? event.srcElement : e.target

    if (firingobj.className=="menuitems"||ns6&&firingobj.parentNode.className=="menuitems"){

    if (ns6&&firingobj.parentNode.className=="menuitems") firingobj=firingobj.parentNode

    if (firingobj.getAttribute("target"))

    window.open(firingobj.getAttribute("url"),firingobj.getAttribute("target"))

    else

    window.location=firingobj.getAttribute("url")

    }

    }

     

    if (ie5||ns6){

    menuobj.style.display=''

    document.oncontextmenu=showmenuie5

    document.onclick=hidemenuie5

    }

     

    </script>

     

    <?

    ";

    }

    ?>

  5. I tried doing this in my navigation area instead of my authentication area. Here is what I tried doing by i'm getting multiple errors. I finally stopped trying and here's the error that was settled on:

     

    Parse error: syntax error, unexpected '.' in /home/anderse/public_html/NAIS/8321/inc/nav.php on line 12

     

     

     

    <?

    $db=mysql_connect ("localhost", "******", "******") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rn=("SELECT Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rz=mysql_query($rn);

     

    while( $row = mysql_fetch_array($rz))

    {

    if (.$row["Status"]=="0")

    echo ("The Administrator has not yet approved your account. You will be contacted once this occurs.");

    else

    echo "

    }

    ?>

     

     

     

     

    <html>

     

    <head>

     

    <META http-equiv="REFRESH" content="60"; url="nav.php">

     

    <SCRIPT TYPE="text/javascript">

    <!--

    function popup(mylink, windowname)

    {

    if (! window.focus)return true;

    var href;

    if (typeof(mylink) == 'string')

     

    href=mylink;

    else

    href=mylink.href;

    window.open(href, windowname, 'width=600,height=300,scrollbars=yes');

    return false;

    }

    //-->

    </SCRIPT>

     

    </head>

     

    <center>

     

    <?

    $dbh=mysql_connect ("localhost", "*******", "******") or die ('I cannot connect to the database because: ' . mysql_error());

    mysql_select_db ("anderse_inventory");

     

    $rnq=("SELECT First,MI,Last,Status FROM users WHERE

    username='" . $_SESSION['username']."'");

     

    $rs=mysql_query($rnq);

     

    while( $row = mysql_fetch_array($rs))

    {

    echo("<h3>".$row["First"]);

    echo(" ".$row["MI"]);

    echo(". ".$row["Last"]);

    echo("</h3> ");

     

    }

    ?>

     

    <?

    $ztime = date("H:i d-M-y", strtotime("now + 6 hour"));

    $ptime = date("H:i d-M-y", strtotime("now -3 hour"));

    $mtime = date("H:i d-M-y", strtotime("now -2 hour"));

    $ctime = date("H:i d-M-y", strtotime("now -1 hour"));

    $atime = date("H:i d-M-y");

     

    ?>

     

    <body bgcolor="#3366FF" text="#99FF00" link="#00FF99" vlink="#00FF99" alink="#00FF99">

     

    <h5><font color=green>Pacific Time: </font><? echo $ptime;?>

    <? echo "<font color=#FFCC33>&nbsp&nbsp Mountain Time: </font>",$mtime;?>

    <? echo "<font color=green>&nbsp&nbsp Central Time: </font>",$ctime;?>

    <? echo "<font color=green>&nbsp&nbsp Atlantic Time: </font>",$atime;?>

    <? echo "<font color=green>&nbsp&nbsp Zulu Time: </font>",$ztime;?><br>

    </font></h5>

    </center>

     

     

     

    <?

    ";

    ?>

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.