That should be $_POST['dowork'] , $_POST[dowork] will attempt to use dowork
as a constant

-----Original Message-----
From: manoj nahar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 17, 2003 10:51 AM
To: Tom Holton
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] strange!


Change this line

if($dowork) {

to


if($_POST[dowork]) {

it should work the. In your php.ini the variable register_gloabal seem
to be off.

Manoj Nahar

Tom Holton wrote:

>Hello everyone,
>I looked through the FAQs and documentation and I cannot find this
>anywhere:
>
>We have a new Redhat server with this kernal: 2.4.20-20.9smp #1 SMP
>We used redhat itself to install apache and php (I used to always do it by
>hand)
>apache: Server version: Apache/2.0.40
>PHP Version 4.2.2
>
>I found the PHP version out by making a file containing: <?phpinfo()?>
>
>I also can get statements like
>
>print "something"
>
>and even
>
>$TT =TRUE;
>if($TT) print "something else";
>
>to work.
>But, incredibly to me, I cannot get form variables to be sent and "seen".
>See the end of the email for the example script.
>
>I can take this very simple script that does not work on this new server
>and have it work on my current server which is running PHP Version 4.1.2
>and Apache Server version: Apache/1.3.22 (Unix)
>
>I saw that there were incompatibility issues with PHP's prior to version
>4.2.3 with Apache 2.0, but, since I can get some statements to work, and
>it is only because the form variables are not recognized, I thought it
>must be some new directive in httpd.conf of php.ini
>
>Any help or info on this is much appreciated!
>
>
><?php
>
>$TT=TRUE;
>if($TT) print "TT worked";
>
>if($dowork) {
>  print "<br>These statements do not print when the dowork button is
>pushed";
>  print "<br>Field 1: $fld1";
>  print "<br>Field 2: $fld2";
>  print "<br>Field 3: $fld3";
>}
>
>
>print "<BR>this statement prints";
>
>?>
>
><form name=asd method=POST>
><br><input name=fld1 size=12>
><br><input name=fld2 size=12>
><br><input name=fld3 size=12>
><br><input type=submit name=dowork value='do work'>
></form>
>
>?>
>
>
>

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

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

Reply via email to