Re: problem with PHP4.3.1 and apache1.3.27
| From: | Foong | Date: | Mon, 14 Apr 2003 06:50:55 +0000 |
| Subject: | Re: problem with PHP4.3.1 and apache1.3.27 | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-27072@lists.php.net to get a copy of this message | ||
it is related to register_global in your php.ini. It defaults to 'off'.
in this case, you need to:
print("UserName:$_GET[UserName]<br>");
print("PassWord:$_GET[Pass]<br>");
replace $_GET[] with $_POST[] is your form method is post
your existing ode only works if register_global is 'on'.
NOTE: It is recomended that setting register_global to 'off' for security
reason.
Foong
"William" <william@sz.net.cn> wrote in message
news:003301c3024d$fc9311e0$0a01a8c0@frank...
> Hello,
>
> I am newbie for this maillist.I have met a problem
> with PHP4.3.1 and apache1.3.27, which is unable to
> pass parameters to php over apache.My installation
> process is as following:
>
> PHP4.3.1:
>
./configure --with-mysql=/usr/local/mysql --with-apache=../apache_1.3.27 --e
> nable-track-vars
> make
> make install
>
> apache:
> ./configure --activate-module=src/module/php4/libphp4.a
> make install
>
> after all above process, I test the followin program, and it work
> correctly:
> <html>
> <body>
> <?
> phpinfo()
> ?>
> </body>
> </html>
>
>
>
>
> and then I test the following Code(in.php), it works in correctly:
> <html>
> <body>
> <form action="in.php" method=GET>
> UserName:<input type="text" name="UserName"><br>
> password:<input type="text" name="Pass"><br>
> <input type="submit" name="submit" value="submit">
> </form>
> <?
> print("UserName:$UserName<br>");
> print("PassWord:$Pass<br>");
> ?>
> </body>
> </html>
>
> In the above in.php program, I cann't pass parameters values
> to UserName and Pass. I don't know it's why?
>
> Thanks in advance!
>
>
> Sincerely
>
> XiaoZheng Ning
>
>
>
>
>