Re: Missing Variables

From: Date: Thu, 14 Oct 2004 11:38:58 +0000
Subject: Re: Missing Variables
References: 1  Groups: php.install 
Request: Send a blank email to php-install+get-14515@lists.php.net to get a copy of this message
Paolo Morgano schrieb:
Hi, I installed PHP5 like DSO for Apache2. I can see php processed pages, but I miss variables... I wrote a simple page to test index.html: <HTML> <BODY> <FORM ACTION="script.php" METHOD="POST"> Input text <INPUT TYPE="TEXT" NAME="var" SIZE="10" MAXSIZE="20"> <INPUT TYPE="SUBMIT" VALUE="Go"> </FORM> </BODY> </HTML> script.php is: <HTML> <BODY> <?PHP
    echo "Insered text is: $var";
    phpinfo();
?> </BODY> </HTML> The function phpinfo() works fine, but I can't print $var value (correctly showed PHP VARIABLES section of phpinfo()) What's wrong in my code (copied from several examples in books and net)? Thanks, Paolo You should use
echo "Insered text is: " . $_POST["var"] . "<br />\n"; instead of echo "Insered text is: $var";
      Hendrik


« previous php.install (#14515) next »