close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

session variable not carrying

Thread began 3/18/2015 6:40 pm by LionsMane | Last modified 3/20/2015 2:21 pm by LionsMane | 3545 views | 20 replies |

LionsMane

session variable not carrying

I've used the webassist mysqli recordset builder to retrieve a record. Then I assign one of the record's column values to a session variable. I know that the variable is properly assigned because on the same page with the mysqli UPDATE function/form, I show the variable successfully. After the user completes the record UPDATE and is redirected to a secondary page, the session variable is suddenly empty. Is there something in the webassist recordset builder (set to pull the record based on the session variable value) that's killing the value on the second page???

Sign in to reply to this post

Jason ByrnesWebAssist

try starting the session on the page that is not showing it. add the following at line 1:
<?php @session_start(); ?>

if the problem persists, I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

LionsMane

session support is already enabled

the session_start is already enabled in the connection code. If I add this, then I get a message that session support is already enabled and that particular instruction I've added will be ignored. Perhaps this is part of the issue, I'm trying to assign a session variable via this method, perhaps you can correct me?

$_SESSION['GID']=$GuestInfo->getColumnVal("GID");

Sign in to reply to this post

Jason ByrnesWebAssist

where is that code added?

is it on the update page?

perhaps code so the session is only set if the recordset has a value:

if($GuestInfo->getColumnVal("GID") != "") {
$_SESSION['GID']=$GuestInfo->getColumnVal("GID");
}

Sign in to reply to this post

LionsMane

The webassist INSERT code includes this instruction: $InsertQuery->saveInSession("GID");

..and when I build an INSERT page pointing to the same secondary page, the record is pulled based on that session successfully. I'm just trying to do the same thing with an UPDATE.

The GID value is already in a different recordset ($GuestInfo) on the update page, used to populate the field values with the existing data so the user can decide what needs to be updated. It's just when the redirect happens after UPDATE, the session doesn't exist.

>>>>More Info: I wanted to share that on the UPDATE page, after the $GuestInfo recordset is pulled, that's where I was trying to assign the GID (from that recordset) to a session variable so that on the final page, that same recordset could be pulled and displayed again - showing the update.

Sign in to reply to this post

Jason ByrnesWebAssist

did you try the if statement i provided?

if the problem persists, I'll need to troubleshoot directly, see the private message section.

Sign in to reply to this post

LionsMane

info included in private statement

Sign in to reply to this post

LionsMane

By the way, I did write a 3-page process as a simplified version of what I'm trying to do, and it all works perfectly. This suggests there's something on the edit-guest page that's getting in the way.

Sign in to reply to this post

Jason ByrnesWebAssist

I added the ifs statement to the edit-guests.php page as i had suggested, and it fixed the problem.

Sign in to reply to this post

LionsMane

Thanks for the help, I'll take a look.

Sign in to reply to this post
loading

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...