Re: troubles with var in URL

From: Date: Mon, 12 Aug 2002 09:09:18 +0000
Subject: Re: troubles with var in URL
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-8079@lists.php.net to get a copy of this message
For your problem you have two solutions: First you edit your php.ini and set the 'register_globals' option to 'On' but it is not a good solution. The second one taht is the better of the two is to use the tab $_GET['<name of the variable>'] to get the variable passed in the url. For example replace your code <? echo "Passed variable: ".$variable; ?> with <? echo "Passed variable: ".$_GET['variable']; ?> It will work better Ezekiel "Cezar" <julescezar2000@yahoo.fr> a écrit dans le message de news: 20020812082701.3166.qmail@pb1.pair.com... > hi, > > first, sorry for my english. > i have troubles with variables passed into an URL . eg > www.mydomain.com/page.php?variable=1 > inside page.php i wana print my variables fallow this code : > > <? > echo "Passed variable: ".$variable; > ?> > > now my OS is RadHat 7.3, Apache/1.3.26 (Unix), PHP/4.2.2, MySQL... > > i install apache server and php fallow this method : > - i remove all rpm installed by RedHat (eg Apache & mysql) > - in php4 directory => > ./configure --enable-calendar --with-apache=../apache_1.3.26 > - make > - make install > - now in apache directory => > ./configure --activate-module=src/modules/php4/libphp4.a > - make > - make install > - i copy php.ini from php-4.2.2 direcory into /usr/local/lib > - i add Addtype application for php and add DirectoryIndex index.php... into > httpd.conf > - finally i run Apache daemon > > thank's for your HELP... > > julescezar2000@yahoo.fr > >

« previous php.install (#8079) next »