Earlier I had a problem with the Login page losing its Security Restrictions (generic term)
After following the suggestion to remove the Browser action and its click attributes or events (whatever)
I got back the Security Login WORKING at my Online test site.
Proper Username and Password accessed the next page.
But lost the Username variable which I have worked on for DAYS.
The Browser Component removal killed the method used to pass along the logged in Username
After trying to repeat the steps that got me to a working solution before I have repeatedly failed to find the crucial path again.
So I went here -- and tried THIS
It is not explicitly stated at the top that it is a method that only works in one situation --- when the Login page upon successful entry stays in place but now displays User information through data binding as the tutorial explains.
I am completely exhausted --- two steps forward -- 3 steps backward.
I now have LIFTOFF again – Secure Login AND a session value essential to filtering data on the other pages.
I realized that some things in Wappler are fixed much more rapidly by modified the actual code instead of relying on App view to move or re-install Components.
I see that most all of the Visual Components applied with App Structure simply make some lines of javascript.
Looking at the code solves thing much faster for me.
I see the sequence of things in the code view – telling me far more than strictly relying on Symbols as ADD Components.
This realization that modifying the code & comparing past editions which I save after every incremental step will help me resolve problems much quicker now.
Ok so first, go to the login page, click the Session Storage Manager, click Define Session Storage Items, make sure under sessionStorage you have sessionusername as a number then replace the body tag of your code with the following
Next on your second page, first click the Session Storage Manager, click Define Session Storage Items, make sure under sessionStorage you have sessionusername as a number then replace the body tag of your code with the following.
The reason I am asking you to double check this is because I found a reference in your code to usernamesession and not sessionusername
<body id="show_hotels" is="dmx-app">
<dmx-serverconnect id="userdetails" url="dmxConnect/api/users/userdetails.php"></dmx-serverconnect>
<dmx-session-manager id="session1"></dmx-session-manager>
<img src="assets/images/logo-drkade.jpg" width="283" height="88" alt="Dr. Kade" id="drkade" class="img-fluid img-thumbnail">
<dmx-serverconnect id="connectionkade" url="dmxConnect/api/get_hotels/hotels.php"></dmx-serverconnect>
<main>
<div class="d-flex text-center flex-column">
<p> :</p>
<p><b>Herzlich Willkommen, liebe Apotheke </b></p>
<p><b>melden Sie sich für eine der folgenden Veranstaltungen an:</b></p>
</div>
</main>
<table class="table table-striped table-bordered table-sm text-center w-100">
<thead>
<tr>
<th class="w-auto text-center">{{session1.data.sessionusername}}Event</th>
<th class="text-left w-25">Eventhotel</th>
<th class="text-center">Eventdate</th>
<th class="text-center">Eventday</th>
<th>Eventcity</th>
</tr>
</thead>
<tbody is="dmx-repeat" dmx-generator="bs4table" dmx-bind:repeat="connectionkade.data.queryhotels" id="tableRepeat1">
<tr>
<td dmx-text="event_id" class="text-center"></td>
<td dmx-text="event_date.formatDate("dd-MM-yyyy")" class="text-center"></td>
<td dmx-text="eventday" class="text-center"></td>
<td>
<a href="#" dmx-bind:href="mykade_events.php?event={{event_id}}&pharmacyid={{session1.data.sessionusername}}&eventhotel={{eventhotel}}&eventdate={{eventhotel}}&eventdate={{event_date.formatDate("dd-MM-yyyy")}}&eventcity={{eventcity}}">{{eventhotel}}</a>
</td>
<td dmx-text="eventcity"></td>
</tr>
</tbody>
</table>
<div class="content">
<main class="text-center font-weight-bolder w-75">
<div class="table-responsive">
<table class="table">
<thead>
<tr>
<th scope="col"></th>
<th scope="col">
<p>Hinweis: Sie können insgesamt 3 Kollegen anmelden und 2 weitere auf die Warteliste schreiben. Wir melden uns so weitere auf die Warteliste schreiben. Wir melden uns so schnell wie möglich bei Ihnen, ob Sie einen festen Platz bekommen.</p>
</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row"></th>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<th scope="row"></th>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>
</div>
</main>
</div>
<script src="bootstrap/4/js/bootstrap.min.js"></script>
<script src="bootstrap/4/js/popper.min.js"></script>
</body>
If something does not work right away, please make sure both files are saved and you have refreshed a few times, or rather close the browser window and reopen, to make sure the previous sessions have been cleared.
If still something wrong, tell me before trying to fix rather so I can check please.
The only thing I was unsure of was a class on your first table of mw-100, I think it is possibly meant to be just w-100 but dont know if you have a custom style for that, so left it alone.
I figured that was what may have happened, haha, it’s all good we all been there.
Lets hope things go a little smoother from here. I did not actually make all that many changes to be honest.
I removed all the onclick events on the browser component
I removed all onclick events on your submit button
I made sure your browser goto and your session set was on the forms success
On the next page, I really just made sure it was sessionusername, and a little clean up of the table code, which is still not 100% correct to be honest, but at least the extra table open and close tags are gone, although your last table on that page only has 3 columns and the next 2 rows have 4, so you need to check that, tables should have an equal amount of columns per row unless you are spanning over columns which you are not, so just check that when you use it.