Jump to content


Login trouble

  • Please log in to reply
No replies to this topic

#1 spInGoBlin

  • Members
  • Pip
  • Newbie
  • 4 posts

Posted 27 April 2006 - 09:05 PM

If you can, please compare 2 pages:
1. [a href=\"http:///www.noon.ee/dbase/addrecord_wlog.php\" target=\"_blank\"]page with login/session_start[/a]
2. [a href=\"http://www.noon.ee/dbase/addrecord_woutlog.php\" target=\"_blank\"]page without login/session start[/a]

The goal is to display an extra row if certain (admin rights) people are logged in (based on SQL row "admin_rights"). Piece of "login.php":
        if($password == $row["password"])
            $_SESSION['adminok'] = "bad";
            $_SESSION['username'] = "username";
            $_SESSION['password'] = "password";
            header("Location: admin.php");
            if ($row['admin_rights'] == 1) {
                $_SESSION['adminok'] = "good";
This far it works, the extra row is there:
<?php if ($adm == "good") {
echo '<tr><td class="tableheader" width="50%">Müügiarve?</td><td class="tablecont" width="50%"><select name="selectSales" onclick="Refresh(0)" size="1">';
    echo '<option value = 1>Jah</option>';
    echo '<option value = 0>Ei</option>';

echo '</select></td></tr>';
} else {};
But the other goal is for the form to refresh whenever a field is changed, displaying different results. This works in addrecord_woutlog.php but not in addrecord_wlog.php. And there is only one difference as far as I can see:
Everything else is the same.
Can anyone please help me to pin the problem? Can there be a problem with the session_start()? Is there anything I'm missing/not aware of? Thank you.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users