close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Update session variable on file upload

Thread began 2/15/2013 9:15 pm by joblackmon445409 | Last modified 2/19/2013 8:40 am by joblackmon445409 | 576 views | 1 replies

joblackmon445409

Update session variable on file upload

Hi I have created a quite complex file upload page. Users can upload 10 different files all with different buttons.

When a user clicks a specific button the file is uploaded to a database AND a folder. The user table is also set to update to show they user has already updated that file. i.e. User uploads file called medical documentation. ------> file goes to database as .PDF (binary), goes to folder as .PDF, and gets updated for that specific user on the users table as an integer from 0 to 1.

I also have that column in the users table set as a server variable on login. I would like to have that server variable immediately update when the file is uploaded or page refresh. What I dont want is the user to have to logout and login to reset the server variable. My overall goal is to show checkmark on the page after successful file upload, I was trying to do this using security assist acess rules manager and server behavior of ShowRegion by access rules.


I probably made this way more confusing than it had to be, but i have no idea how to code...

I have tried a simple session_start () and that does not work. I should also tell you that I have security assist limit access to specific users on this page according to UserLevel.

I have also tried to update server variable by
<?php
@session_start();
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $k => $v) {
// store as session
$_SESSION[$k] = $v;
}
}
?>

and then echoing the form, but remember they enter a file to upload... and my server variable is and intenger 0 or 1.

Is there a way to update server variable from recordset or pull the intager directly from database?

Attached Files
physicianslink.zip

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