Whats the problem with this ?

From: Date: Tue, 30 Apr 2002 17:42:08 +0000
Subject: Whats the problem with this ?
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1870@lists.php.net to get a copy of this message
guys tell me whats the problem in this code ok i just dont seem to find it after i enter username and password it just goes off window closes i dunno why ? help me the code is : ------------------------------------------------- <?php // Load the PHP-GTK extension $extension = "php_gtk" . (strpos(PHP_OS, "WIN") >= 0 ? ".dll" : ".so"); dl($extension); // Create a new window $window = &new GtkWindow(); $window->set_title("CMR Cultura 2002"); $window->set_usize(500, 500); $window->set_position(GTK_WIN_POS_CENTER); $window->set_policy(true,true, true); // Set a callback function for the destroy signal $window->connect("destroy", "killwin"); function killwin() { gtk::main_quit(); } $box = &new GtkVBox(); $window->add($box); $label1 = &new GtkLabel("User Name : "); $box->pack_start($label1); $username = &new GtkEntry(); $box->pack_start($username); $label2 = &new GtkLabel("Password : "); $box->pack_start($label2); $password = &new GtkEntry(); $box->pack_start($password); $button = &new GtkButton("Login"); $button->connect("clicked", "login"); $box->pack_start($button); function login($theButton) { // Get all widgets global $window; global $label1; global $label2; global $box; global $username; global $password; global $button; // Hide all controls $label1->hide(); $label2->hide(); $username->hide(); $password->hide(); $button->hide(); $dUser = $userword->get_text(); $dPass = $password->get_text(); if($dPass=="mahendra") { $pList1 = " is of "; } else { $pList2 = "fuck off"; } // Create a GtkCList and show it $p1 = &new GtkLabel("$pList1"); $box->add($p1); $p1->show(); $p2 = &new GtkLabel("$pList2"); $box->add($p2); $p2->show(); } // Show the window $window->show_all(); // Start the main PHP-GTK listener loop gtk::main(); ?> ------------------------------------------------- ===== ====================================== From : Mahendra Kalkura ICQ UIN : 55974752 Yahoo ID : mahendra_kalkura URL : http://mahendra.sehost.net/ ====================================== __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com

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