close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

MySQLi Login User with Session Variable Problem

Thread begun 12/27/2023 4:35 am by DeanCollins | Last modified 12/29/2023 1:15 pm by Mags | 200 views | 4 replies |

DeanCollins

MySQLi Login User with Session Variable Problem

I have a table with only two records at present. This recycle_site table has the site supervisors email and password. At present, for testing the emails of the two supervisors are distinct. However, when I log in, and go to the index page, only the first record is displayed on the page. Using the site supervisor's email in the second record still produces the first site supervisor on the page.
I've attached the login and index files.
Any help would be appreciated.

Sign in to reply to this post

PatriceWebAssist

Dean:
During this period of transition, please post files in the public area so peeps can review.
Ray has passed away. We are relying on other users to find solutions.

Sign in to reply to this post

DeanCollins

Here are the two files.

Attached Files
index.php
login.php
Sign in to reply to this post

PatriceWebAssist

thanks..
https://www.mcwd.org/index.html

Sign in to reply to this post

Mags

You haven't added a Repeat Region around the information you want listed, so it's only displaying the first record. Select the bit you want to repeat, i.e.:

<p><?php echo($Recordset1->getColumnVal("site_id")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_name")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_apn")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_addr")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_super")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_superphone")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_superemail")); ?></p>

then in Server Behaviors, click the plus sign then WebAssist > MySQLi > MySQLi Repeat Region. Select Recordset1 from the dropdown list and click All records. This will then add the repeat region around the info above like this:

<?php
$wa_startindex = 0;
while(!$Recordset1->atEnd()) {
$wa_startindex = $Recordset1->Index;
?>

<p><?php echo($Recordset1->getColumnVal("site_name")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_apn")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_addr")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_super")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_superphone")); ?></p>
<p><?php echo($Recordset1->getColumnVal("site_superemail")); ?></p>

<?php
$Recordset1->moveNext();
}
$Recordset1->moveFirst(); //return RS to first record
unset($wa_startindex);
unset($wa_repeatcount);
?>

It should also automatically change the number at the end of the first line of your Recordset from 1 to 0:

$Recordset1 = new WA_MySQLi_RS("Recordset1",$connForms,0);

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...