-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 13 Apr 2004 06:11, Morris Law wrote:
> Dear all PHP users,
>
> I have installed a new web server for PHP scripting.
> I wrote a PHP form page to submit some variables to
> another PHP pages.  After submission, I found that the
> variables cannot be echoed out.   The scripts are as simple
> like these,
>
> <!-- hello2.php-->
> <body>
> <?php
>     print "<form action=\"hello.php\" method=\"POST\">\n";
>     print "Name: <input type=\"text\" name=\"name\"><br>\n";
>     print "<input type=\"submit\">\n</form>\n";
> ?>

Unless register_globals is off, you need to use the $_GET/$_POST super-globals 
to access request data.

> <!-- hello.php-->
> <body>  <?php echo("Hello, $name!\n"); echo("<p>\nWhat a <b>bold</b> move
> this is!\n"); ?>  </body>

..so this would become:

  <?php
    echo("Hello, {$_POST['name']}!\n");
  ?>

See the manual (<http://www.php.net/manual/en/>) if you don't understand any 
of the above constructs.

> What sort of problem relating to installation is it?
>
> Thanks for any inputs and advice.

Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

"When I say something, I put my name next to it." -- Isaac Jaffee

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAe5XsaIgMKkVlSLQRAj7kAJ9G6NjjofohXAjYSQc7UZ2H6qeCdQCfXlBG
eqykNp0EeSGn0oHlc+dXwx0=
=ZkLv
-----END PGP SIGNATURE-----

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to