Re: Whats the problem with this ?

From: Date: Tue, 30 Apr 2002 18:00:38 +0000
Subject: Re: Whats the problem with this ?
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-1877@lists.php.net to get a copy of this message
I had no problem with the module loading, so didn't replace any of that. $userword !== $username Guys, can we have an Offensive Code Competition please? :) ----- Original Message ----- From: "Michael Dransfield" <mike@blueroot.net> To: "Mahendra Kalkura" <mahendra_kalkura@yahoo.com> Cc: "PHP-GTK gen" <php-gtk-general@lists.php.net> Sent: Tuesday, April 30, 2002 6:55 PM Subject: Re: [PHP-GTK] Whats the problem with this ? > i am running on linux > > 1: there was a problem loading the gtk module i replaced your code with > dl( 'php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : > 'so')); > > and the window displayed, > > 2: you have a bug userword should be password > > Oh and try not to post offensive messages in your code > > > On Tue, 2002-04-30 at 18:42, Mahendra Kalkura wrote: > > 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 > > > > -- > > PHP-GTK General Mailing List (http://gtk.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > -- > PHP-GTK General Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

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