Re: displaying variables, a simple question

From: Date: Wed, 14 May 2003 06:18:51 +0000
Subject: Re: displaying variables, a simple question
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-19922@lists.php.net to get a copy of this message
Well depending on how you are displaying this page i have some ideas if you are passing a variable to it from another page (ie .. page.php?breed=something ( or via post )) your online site might register_globals turned on so that works fine but PHP has register_globals tured off by default for reasons that i would leave them off and write your code the right way. In that case you could use <?php echo $_REQUEST['breed'] ?> for any method <?php echo $_POST['breed'] ?> only post vars. <?php echo $_GET['breed'] ?> only get vars. if you do have register_globals turned on, on your server then it might be IIS i use Apache at home but am forced to use IIS @ work : ( and i get all kinds of errors when i try totake a script i made that works on apache and run it on IIS so you might want to try this <?= $_REQUEST['breed'] ?> or <?= $breed ?> Hope this helps "Acorn Tutors" <info@acorntutors.com> wrote in message news:20030513122015.59735.qmail@pb1.pair.com... > Hi folks. Is it possible for anyone to tell me why I can do <?php echo > $breed?> on my online site and I will get the variable supplied, but yet > when I try the same thing on my own computer (Win XP Pro, with IIS and PHP > and MYSQL installed) it fails to show the variable (it says that I have an > undefined variable called breed)? > > Help appreciated, > Doug > >

« previous php.windows (#19922) next »