<[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I installed apache1.3.12 as the web server and php5 beta version,I write a
> test.html and test.php like this:
> //test.htm
>
> <form action="test.php" method="post">
> Name:<input type="text" name="name"><br>
> <input type=image src="image.gif" name="sub">
> </form>
> //test.php
> <?php
>   echo "Hello!".$name ;
> ?>
> the same source works well with php4 and apache 1.3.27
> but it doesn't work well in my new enviroment, until I modified test.php
> like this
> //new test.php
> <?php
>   echo "Hello!".$_POST['name'] ;
> ?>
>
> who can tell me which one cause this problem,Is the version php5 not
> satisfy or the apache 1.3.12?
Check your php.ini for this setting : 'register_globals'. With your new
installation, it is set to off, causing $_POST['name'] (the original
variable!) not to be registered to $name. With register_globals set to on,
you can use your first script.

I want to warn you though, PHP depricates the use of register_globals = On,
so it would be recommendable to use your modified script and keep coding
using $_POST, $_GET and these kind of global variables.

--
[Win2000 | Apache/1.3.23]
[PHP/4.2.3 | MySQL/3.23.53]

Ivo Fokkema
PHP & MySQL programmer
Leiden University Medical Centre
Netherlands



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

Reply via email to