[Wylug-help] LAMP: form vars not passed to php script

Gavin Harris gavin at phiji.com
Wed, 8 Jan 2003 10:45:25 +0000 (GMT)


Hi Andy,

Just a suggestion, how are you accessing the form variables?

If you are calling them just as $username and the like, then you might be
having a problem with the register_globals in php.ini now being defaulted
to 'off'. It really is best this way.

You'll need to do something like '$username =
$HTTP_POST_VARS['username'];' instead, or turn register_globals 'on'.

--
Gavin Harris

On Wed, 8 Jan 2003, Andy Macdonald wrote:

> I wrote a little app using LAMP which works OK and then built a faster machine
> to run it on: RedHat 7.1, Apache 1.3.27, MySQL 3.23.54a, PHP 4.3.0
> (I also installed OpenSSL 0.9.7 and ModSSL 2.8.12).
>
> I copied all the scripts over and exported and imported the SQL data, but they
> didn't work. Initially this was because I hadn't set up the MySQL user I was
> using to access the data in the PHP script, but now I've fixed that and I find
> that form variables (userid, pwd) from my initial html form don't get through
> to the 'action' script - login.php ??
>
> MIME types in httpd.conf -
>     AddType application/x-httpd-php .php
>     AddType application/x-httpd-php-source .phps
>     AddType application/x-tar .tgz
>
> Can anyone point out my simple blunder?
>
> --
> Andy Macdonald
> Network Manager, Greenhead College
> Huddersfield, HD1 4ES, England.
> Tel: 01484 422032
> Mobile: 07932 635057
> See award winning web site:
> http://www.greenhead.ac.uk
>
>
>
>
>
>
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help@wylug.org.uk
> http://list.wylug.org.uk/mailman/listinfo/wylug-help
>