Managing Dialogs - Newbie Needs Guidence!

From: Date: Thu, 18 Jul 2002 14:21:12 +0000
Subject: Managing Dialogs - Newbie Needs Guidence!
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-2262@lists.php.net to get a copy of this message
Hello! I'm a bit of a newbie and stuck on a concept issue (I think) Advance apologies if I'm too wordy here. Similar to james' message "Why won't this work?", I am creating a MySQL appliciation that I would like to do this: 1) Start the main loop with a function to create a std window with a menubar across the top. I got this far no problem. 2) If the global variable "$userisloggedin," include a .inc file and run its function "login_dialog." So far, no problem. No the user has the main application window in the background and the modal login dialog box in front. 3) The user enters a login name, password, and selects a database from a hard-coded list, then clicks the Login button that is connected to the do_login function. Okay... 4) The do_login function connects to the database, queries a user info table, and pops an alert box if there any issues with the user input (like wrong password, or non-existant user name, etc.) The alert box has a button with a close_window button, which works fine, leaving the use back at the login_dialog box. Fin...no problem. 5) BUT!!!!!.....if all the login info is correct, I want the do_login function to: a) set the GLOBAL variables $userisloggedin to "YES" and $usersfirstname to "Joe" (as per the query result.) This seems to work. b) CLOSE the login_dialog dialog returning the user to the main application window with the global variables set. But I can't seem to close the login_dialog without shutting the whole applciation down. How do we handle closing the login_dialog without killing the main applciation? Do I need to unrealize somthing? Am I misusing my close_window function? Sorry if this is not a clear question...Any examples, insight or conceptual pointers are greatly appreciated! Many thanks, Mark

« previous php.gtk.general (#2262) next »