Logged in user details on all php pages

I do not understand why 'getuserdetails.php' is giving me this result:

object {4}
identity_boom_lecturer: null
identity_student_boom: null
identity_am: null
identity_pin: null

If the condition, 'customer_identity', is not met (in my example) , then the query should not be executed.

Edit: I also noticed this in your document:

<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<link rel="stylesheet" href="/bootstrap/5/css/bootstrap.min.css" />

Links to 2 different Bootstrap CSS files.

The same for JS files:

<script src="../bootstrap/5/js/bootstrap.bundle.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script></body>

Especially the JS files may lead to problems.

here is the link

https://nexademics.com/digital-class/index.php

lecturer Modal

test email: ed@rhodes.com
password: 00000000

on the pc after login please try to use the dynamic off canvas buttons to redirect to different pages multiple times and you will see the lecturer id being lost.

The header contains a greeting and logged in lecturer name so if its empty it means the id has been lost

I see quite a mess on this page.

  • multiple html, body and head tags
  • multiple app connect includes
  • a server action with a name of logout_lecturer.php included multiple times on the page and called on page load. You don't want to load the logout action on page load...

I suggest you to fix this issues before continuing debugging your problem.

okay please let me work on those first

This was a game changer though still testing it out but sofar the redirects are working and seems like the system doesnt loose the loggedin user Id any more

but there is another problem this popup comes every time a user clicks on a button redirecting them to a page
actually
image

How do I fix it please

You need to fix the issues which @Teodor pointed out (multiple html, body and head tags etc)

You will need to check your php includes on the page. None of the should have any html/body/head tags. Only your main page should have them.

I have removed them from the include but still shows the popup

Please remove this from your page:

<script>
    // Check if dmxAppConnect is already initialized
        if (typeof window.dmxAppConnect === 'undefined') {
            // Load dmxAppConnect only if not already loaded
            document.write('<script src="../../dmxAppConnect/dmxAppConnect.js"><\/script>');
        }
</script>

You only need the include that you already have on your page:

<!-- Core Scripts -->
    <script src="../../dmxAppConnect/dmxAppConnect.js"></script>

so this other custom script should not be there.

WOW This is GREEEEAAAAAATTTT !!!
Thanks so much!!!
Teodor and Every One for the Help and Guidance
So far every thing works as expected! Let me keep improving and learning

You all Rock!
Thanks Again

4 Likes