Logged-in user info doesn't display after the user updates their info

I created 2 pages. Page 1 has a recordset that displays only the users username and password, I did a filter on this recordset as username = session var = MM_Username. when they click update, which is just a link to page 2, they go to page 2 which has a recordset that filters their user info the same way and allows them to update their username and password. I used an update behavior on this page as well. So, when the user updates their info it DOES change the database info and works great.
The problem: When the user goes back to page 1 to see their updated username and password that they just updated, it is BLANK. no info displays on screen, even when I refresh the page. it's if the MM_Username var is not refreshing while logged-in. Because when the user logs out and logs back in, it DOES display new username and password on page 1.
Now it DOES work when I take the filter off of page 1's recordset, but this won't do me any good b/c the user should of course only see their info.
I am running DW CS3, php, and mysql.
Please Help! thanks.

PAGE 1
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", 
$theNotDefinedValue = "")
   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : 
$theValue;
   $theValue = function_exists("mysql_real_escape_string") ? 
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
   switch ($theType) {
     case "text":
       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
       break;
     case "long":
     case "int":
       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
       break;
     case "double":
       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . 
"'" : "NULL";
       break;
     case "date":
       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
       break;
     case "defined":
       $theValue = ($theValue != "") ? $theDefinedValue : 
$theNotDefinedValue;
       break;
   return $theValue;
$colname_rsUpdateUser = "-1";
if (isset($_SESSION['MM_Username'])) {
   $colname_rsUpdateUser = $_SESSION['MM_Username'];
mysql_select_db($database_kh_space, $kh_space);
$query_rsUpdateUser = sprintf("SELECT username, parentEmail FROM users 
WHERE username = %s", GetSQLValueString($colname_rsUpdateUser, "text"));
$rsUpdateUser = mysql_query($query_rsUpdateUser, $kh_space) or 
die(mysql_error());
$row_rsUpdateUser = mysql_fetch_assoc($rsUpdateUser);
$totalRows_rsUpdateUser = mysql_num_rows($rsUpdateUser);
?>
PAGE 2
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", 
$theNotDefinedValue = "")
   $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : 
$theValue;
   $theValue = function_exists("mysql_real_escape_string") ? 
mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
   switch ($theType) {
     case "text":
       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
       break;
     case "long":
     case "int":
       $theValue = ($theValue != "") ? intval($theValue) : "NULL";
       break;
     case "double":
       $theValue = ($theValue != "") ? "'" . doubleval($theValue) . 
"'" : "NULL";
       break;
     case "date":
       $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
       break;
     case "defined":
       $theValue = ($theValue != "") ? $theDefinedValue : 
$theNotDefinedValue;
       break;
   return $theValue;
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
   $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
   $updateSQL = sprintf("UPDATE users SET username=%s, password=%s 
WHERE userId=%s",
                        GetSQLValueString($_POST['username'], "text"),
                        GetSQLValueString($_POST['password'], "text"),
                        GetSQLValueString($_POST['userId'], "int"));
   mysql_select_db($database_kh_space, $kh_space);
   $Result1 = mysql_query($updateSQL, $kh_space) or die(mysql_error());
   $updateGoTo = "confirmation.php";
   if (isset($_SERVER['QUERY_STRING'])) {
     $updateGoTo .= (strpos($updateGoTo, '?')) ? "&" : "?";
     $updateGoTo .= $_SERVER['QUERY_STRING'];
   header(sprintf("Location: %s", $updateGoTo));
$colname_rsUpdateUser = "-1";
if (isset($_SESSION['MM_Username'])) {
   $colname_rsUpdateUser = $_SESSION['MM_Username'];
mysql_select_db($database_kh_space, $kh_space);
$query_rsUpdateUser = sprintf("SELECT userId, username, password, 
parentEmail FROM users WHERE username = %s", 
GetSQLValueString($colname_rsUpdateUser, "text"));
$rsUpdateUser = mysql_query($query_rsUpdateUser, $kh_space) or 
die(mysql_error());
$row_rsUpdateUser = mysql_fetch_assoc($rsUpdateUser);
$totalRows_rsUpdateUser = mysql_num_rows($rsUpdateUser);
?>

Similar Messages

  • Photoshop CC doesn't open after the last update

    Photoshop CC dosn't open after I updated it last night. I tried resatrting my iMac couple time and it didn't work.
    I have 2011 iMac 2.8 Core i7 with OS X 10.8.4
    Please help, I have a lot of work to do.

    It was a file corruption issue due to which checksum was failing.
    Uninstall and reinstall was the proposed resolution.
    Wks, please confirm what is the status of PS on your machine.

  • New tab doesn't open after the latest update

    When I try to open a new tab nothing happens. I like to open a new tab before going to my bookmarks and opening one, so I can still have email open in one tab and other websites in other tabs. I can't open blank tabs now.

    Yes, that worked! Thanks Tony!
    KathyS

  • My imovie doesn't open after the latest update of the system

    have recently updated both iMovie as well as Mavericks OS and now I am having trouble opening iMovie.  When I click on the icon, it bounces for a few seconds as normal but then nothing loads.  When I left click on the icon I am given options including Force Quit of which I click.  It then asks if I wish to send a report and below are the details of the report.  Any help would be appreciated.
    Date/Time:       2014-05-18 21:17:37 +0200
    OS Version:      10.9.3 (Build 13D65)
    Architecture:    x86_64
    Report Version:  18
    Command:         iMovie
    Path:            /Applications/iMovie.app/Contents/MacOS/iMovie
    Version:         10.0.3 (245586)
    Build Version:   1
    Project Name:    iMovieX
    Source Version:  24558006035000000
    App Item ID:     408981434
    App External ID: 521012678
    Parent:          launchd [283]
    PID:             848
    Event:           hang
    Duration:        0.76s (process was unresponsive for 10 seconds before sampling)
    Steps:           8 (100ms sampling interval)
    Hardware model:  MacBookPro8,1
    Active cpus:     4
    Fan speed:       2009 rpm
    Free pages:      10802 pages (-5669)
    Pageins:         1 pages
    Pageouts:        0 pages
    Swapins:         0 pages
    Swapouts:        0 pages
    Process:         iMovie [848]
    Path:            /Applications/iMovie.app/Contents/MacOS/iMovie
    Architecture:    x86_64
    Parent:          launchd [283]
    UID:             501
    Task size:       61715 pages (+4613)
    CPU Time:        0.733s
    Note:            Unresponsive for 10 seconds before sampling

    same here. official cd, license but no app opens. uninstalled installed restarted etc etc no result. Microsoft wants us to move to 2013, but 2011 is fine with me and I don't want a subscription on 99 Euro a year

  • [Open a new tab] doesn't work after the last update!

    Firefox just updated today and now all the sudden when I try to press the [+] to open a new tab nothing happens. Mousing over it even says it's still the same button. It's odd and rather inconvenient.
    Firefox is updated to Version 29.0.1

    Hello,
    try to uninstall your Firefox and then reinstall your Firefox.

  • How can I make the Stock Market Panel load AFTER the User Enters correct password?

    Can someone PLEASE help me. I need the Second part of this code(the Stock Market Panel) to be display after the user enters the correct username and password I have predefine. I really need to complete this project for school, Last Semester and i want to finally graduate!
    <?xml version="1.0"?>
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                     xmlns:mx="library://ns.adobe.com/flex/mx"
                                     xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Script>
                        <![CDATA[
                                  import mx.controls.Alert;
                                  public var u:String;
                                  public var p:String;
                                  public function log():void
                                            u=user.text.toLowerCase();
                                            p=pass.text.toLowerCase();
                                            if((u==''||u!='webmultimedia')||(p==''||p!='abc'))
                                                      Alert.show('Wrong userid or Password','Sorry',Alert.OK | Alert.CANCEL);
                                            else
                                                      Alert.show('Hi','Welcome',mx.controls.Alert.OK);
                                  public function clear():void
                                            user.text='';
                                            pass.text='';
                        ]]>
              </fx:Script>
              <mx:Panel id="NewForm" title="Please Log In" height="214" width="285" horizontalAlign="center" verticalAlign="middle" horizontalCenter="23" verticalCenter="2">
                        <mx:Label id="User Name" text="User Name"/> 
                        <mx:TextInput id="user" />
                        <mx:Label id="password" text="Password"/>
                        <mx:TextInput id="pass" displayAsPassword="true"/>   
                        <mx:Button id="submit" label="Submit" click="log()"/>
              </mx:Panel>
              <mx:Panel width="349" height="383" chromeColor="#1B8905" color="#FFFFFF" focusColor="#0F3CFF"
                                    fontFamily="Georgia" fontSize="21" fontWeight="bold" paddingBottom="10"
                                    paddingLeft="10" paddingRight="10" paddingTop="10" title="Stock Market">
                        <!--First Pane Of TabNavigator-->
                        <mx:TabNavigator borderStyle="solid">
                                  <mx:VBox y="71" width="371" height="334" label="Dow Jones"
                                                       chromeColor="#0A741C">
                                            <mx:Image id="loader1" source="http://dl.dropbox.com/u/8861424/stock1.png"/>
                                            <mx:RichTextEditor id="myRTE" width="355" height="286" borderVisible="true"
                                                                                       color="#000000" text="Enter Stock Comment"/>
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="SandP" width="500" height="350">
                                            <mx:Image id="loader2" source="http://dl.dropbox.com/u/8861424/Untitled.png"/>
                                            <mx:RichTextEditor id="myRTE2" width="355" height="286" borderVisible="true"
                                                                                       color="#000000" text="Enter Stock Comment"/>
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="Nasdaq" width="500" height="350">
                                            <mx:Image id="loader3" source="http://dl.dropbox.com/u/8861424/stock2.png"/>
                                            <mx:RichTextEditor id="myRTE3" width="355" height="286" borderVisible="true"
                                                                                       color="#000000" text="Enter Stock Comment"/>
                                  </mx:VBox>
                        </mx:TabNavigator>
              </mx:Panel> 
    </mx:Application>

    it's probably not the correct way to do it but I am more familiar with Flex4 (which use states) but this works
    however i had to remove your Alert they were throwing an error
    <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                                            xmlns:mx="library://ns.adobe.com/flex/mx"
                                            xmlns:s="library://ns.adobe.com/flex/spark">
              <fx:Script>
                        <![CDATA[
                                  import mx.controls.Alert;
                                  public var u:String;
                                  public var p:String;
                                  public function log():void
                                            u = user.text.toLowerCase();
                                            p = pass.text.toLowerCase();
                                            if ((u == '' || u != 'webmultimedia') || (p == '' || p != 'abc'))
                                                      //Alert.show('Wrong userid or Password', 'Sorry', Alert.OK | Alert.CANCEL);
                                            else
                                                      //Alert.show('Hi', 'Welcome', mx.controls.Alert.OK);
                                                      stockMarket.visible = true;
                                                      NewForm.visible = false;
                                  public function clear():void
                                            user.text = '';
                                            pass.text = '';
                        ]]>
              </fx:Script>
              <mx:Panel id="NewForm"
                                    title="Please Log In"
                                    height="214"
                                    width="285"
                                    horizontalAlign="center"
                                    verticalAlign="middle"
                                    horizontalCenter="23"
                                    verticalCenter="2">
                        <mx:Label id="UserName"
                                              text="User Name" />
                        <mx:TextInput id="user" />
                        <mx:Label id="password"
                                              text="Password" />
                        <mx:TextInput id="pass"
                                                        displayAsPassword="true" />
                        <mx:Button id="submit"
                                               label="Submit"
                                               click="log()" />
              </mx:Panel>
              <mx:Panel id="stockMarket"
                                    visible="false"
                                    width="349"
                                    height="383"
                                    chromeColor="#1B8905"
                                    color="#FFFFFF"
                                    focusColor="#0F3CFF"
                                    fontFamily="Georgia"
                                    fontSize="21"
                                    fontWeight="bold"
                                    paddingBottom="10"
                                    paddingLeft="10"
                                    paddingRight="10"
                                    paddingTop="10"
                                    title="Stock Market">
                        <!--First Pane Of TabNavigator-->
                        <mx:TabNavigator borderStyle="solid">
                                  <mx:VBox y="71"
                                                       width="371"
                                                       height="334"
                                                       label="Dow Jones"
                                                       chromeColor="#0A741C">
                                            <mx:Image id="loader1"
                                                                  source="http://dl.dropbox.com/u/8861424/stock1.png" />
                                            <mx:RichTextEditor id="myRTE"
                                                                                       width="355"
                                                                                       height="286"
                                                                                       borderVisible="true"
                                                                                       color="#000000"
                                                                                       text="Enter Stock Comment" />
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="SandP"
                                                       width="500"
                                                       height="350">
                                            <mx:Image id="loader2"
                                                                  source="http://dl.dropbox.com/u/8861424/Untitled.png" />
                                            <mx:RichTextEditor id="myRTE2"
                                                                                       width="355"
                                                                                       height="286"
                                                                                       borderVisible="true"
                                                                                       color="#000000"
                                                                                       text="Enter Stock Comment" />
                                  </mx:VBox>
                                  <!-- Second pane of TabNavigator -->
                                  <mx:VBox label="Nasdaq"
                                                       width="500"
                                                       height="350">
                                            <mx:Image id="loader3"
                                                                  source="http://dl.dropbox.com/u/8861424/stock2.png" />
                                            <mx:RichTextEditor id="myRTE3"
                                                                                       width="355"
                                                                                       height="286"
                                                                                       borderVisible="true"
                                                                                       color="#000000"
                                                                                       text="Enter Stock Comment" />
                                  </mx:VBox>
                        </mx:TabNavigator>
              </mx:Panel>
    </mx:Application>

  • HTML doesn't display after generating the HTML files.

    There don't seem to be any errors during the generation of the HTML help project, but when I view the results, the content doesn't display and the window displays the following:
    Navigation to the webpage was canceled

    This sounds like you are running the file on a networked drive. Read this link.http://www.grainge.org/pages/authoring/chm_mspatch/896358.htm. If not, can you post an image of what you are seeing.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How do I received the filled out form via email? After the user hits SUBMIT, I'd like to receive the filled out form via email.

    How do I received the filled out form via email? After the user hits SUBMIT, I'd like to receive the filled out form via email.

    Formscentral doesn't support direct delivery of filled forms via email at this time. You can however use Acrobat to add an email link to a form instead of a submit button. In this way the PDF will be returned to the email of your choice.
    Andrew

  • How to kill the session after the user exit the ADF application

    Dear all
    I have a problem
    The problem is the session still exist after the user close the application and the browser. I want to kill all sessions that is not active.
    This is my test scenario:
    1- I open IE and run my ADF application that is deployed on weblogic. http://192.168.100.17:7001/myapp/faces/login
    2- At the same time I issue this SQL command to view the sessions for user 'ADFUSER' - the "ADFUSER" is the schema user.
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER';QUERY RESULT IS
    USERNAME                       MODULE                                           STATUS
    ADFUSER                         JDBC Thin Client                                 INACTIVE3- Now the user close the browser
    4- Run the SQL again and I notice that the session still exist
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER'RESULT:
    USERNAME                       MODULE                                           STATUS
    ADFUSER                        JDBC Thin Client                                 INACTIVE5- now the user open the URL again http://192.168.100.17:7001/myapp/faces/login
    6-Run the SQL again , and I notice that the old session still exists and a new session created too.
    SELECT USERNAME,STATUS FROM v$session
    WHERE USERNAME = 'ADFUSER'RESULT:
    USERNAME                       MODULE                                           STATUS
    ADFUSER                        JDBC Thin Client                                 INACTIVE
    ADFUSER                        JDBC Thin Client                                 INACTIVE
    2 rows selected.and every time I login to the application , a new session is open and the old session still exist
    I do not know why this happens
    I want to kill old session when the user close the application.
    These sessions are cleared only when i restart the weblogic domain.
    here is some information about my development environment:
    Jdeveloper 11.1.2.3
    WebLogic Server Version: 10.3.5.0
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    thanks in advance

    Hi,
    for performance reasons you should not use dedicated user connections to the database. Instead you use JDBC data sources (default in JDeveloper for ADF BC) that you can configure the database connection pooling for. This means that your v$session will always show a set of active session, which however are shared among users. Assuming you use ADF BC, this is what happens
    - A user requests a data bound page
    - The ADF BC checks out an AM and connects to the database using one of the database connections in the pool
    ... user work here ...
    - user exits application
    - ADF BC returns AM to pool and passivates pending user state (if application is left with dirty transaction)
    - Database connection is available in pool as soon as AM released
    This also happens between requests. Long story cut short: v$session doesn't give you a true picture
    Frank

  • After the IOS7 update, i can no longer use my imessage and facetime. It says "waiting for activation" and tried to log in on my apple id but it turned out to connection error. Please help me guys! Thank you.

    After the IOS7 update, i can no longer use my imessage and facetime. It says "waiting for activation" and tried to log in on my apple id but it turned out to connection error. Please help me guys! Thank you.

    Have you tried to reboot your phone(hold home and lock button simutainiously)?

  • How to end showing the JTextfild in a JTable, after the user ended editing?

    Hi,
    I created a JTable with an own TableModel and I wrote my own
    editingStopped function:
    public void editingStopped(ChangeEvent e)
    String helpName = new String(Framed.currentGame.players.getPlayerNames()[getEditingRow()]);
    JTextField helpNewName = (JTextField)getEditorComponent();
    Framed.currentGame.players.setName(helpName, helpNewName.getText());
    Well everything works fine, except that the JTextfield doesnt go away after the user clicked on another cell. How can I return to show the cell instead of the JTextfield used for editing?

    Or if the value is String you may try:
    Object obj = table.getValueAt(i,j);
    String str=null;
    if (obj instanceof String){
    str = (String) obj;
    }

  • My Contacts program opens but doesn't display on the screen (it appears to be off above the top right hand corner).

    My Contacts program appears to open, but doesn't display on the screen (it appears to be sitting just above the top right hand corner). any suggestions on how to get it back?

    Launch Contacts, then on the "Window" menu select "Zoom". That should maximise the window and give you access to the bottom-right corner where you can resize it, and the bar at the top which you can drag around.

  • My Skype number doesn't display on the phone of pe...

    I purchased a Skype number, and I can receive call on that number. However my Skype Number  doesn't display on the phone of the people I am calling.

    Hi, Julia-T, and welcome to the Community,
    Have you seen this library of FAQ articles related to Caller ID?
    https://support.skype.com/en/category/CALLER_IDENTIFICATION/
    Best regards,
    Elaine
    Was your question answered? Please click on the Accept as a Solution link so everyone can quickly find what works! Like a post or want to say, "Thank You" - ?? Click on the Kudos button!
    Trustworthy information: Brian Krebs: 3 Basic Rules for Online Safety and Consumer Reports: Guide to Internet Security Online Safety Tip: Change your passwords often!

  • Module status on LMS is showing as incomplete - even after the user has completed the module.

    Hi Folks,
    Hope you are all keeping well! I have a bit of a problem here. On a number of modules that were developed using presenter - and custom animation (including click next to continue) etc etc, the LMS is not showing the module status as complete - even AFTER the user had comleted the module and closed. This problem has been noticed only when the user uses the CLICK NEXT or click this part of the screen to continue.
    When the user navigates using the presenter control buttons - to navigate the training content that is, the LMS is correctly showing as the module has been completed.
    The problem I am having is that - is there any way to make presenter detect a click within a slide (user click to navigate from within a slide) and thereby register it as a valid module completion?
    Thanks in advance folks,
    Kind Regards,
    Alex.

    Hi Shubi,
    Thanks for you quick reply.
    Shubhi Shukla Dubey wrote:
    Hi Alex,
    Which LMS server you are using?  Secondly what is the Setting in Quiz>Reporting tab is it SCORM 1.2,2004 or Aicc.
    You want status on basis of user clicks then please make sure that Report data is set to "Slide view =100%" (or whatever precentage you want) and  Report Pass/Fail set to "Complete/ Incomplete."
    Thanks,
    Shubhi
    LMS = cornerstone on demand. It has been customised to suit the company requirements, Reporting tab is SCORM 1.2   
    To circumvent the issue I have changed the % view to 0% so in theory when the user launches even one slide / page - it will set it to report as status complete.
    However this is not a viable solution on content critical modules....dont you think so?
    Ideally I would like to get to the bottom of why a button within the module (which is able to navigate between pages) is not being able to report / set / increment the completion status counter.
    Thanks and Kind Regards,
    Alex.

  • Please help. Does anyone have a solution re: After the latest update my display has really huge fonts and is unusable

    After the latest update my display on my iphone has really huge fonts and is unusable.
    I can't even get the swipe bar.

    The easiest way to turn off the zoom accessibility feature is to connect your phone to iTunes on your computer.  In the Summary pane, click the "Configure Universal Access..." button.  On the next screen, under "Seeing", select "Neither" and click OK.

Maybe you are looking for