Thanks for the help! You were right about the register_globals being off! I tried to turn it on just to see if it fixes the problem, but I still get the same error: When I use: if($submitform){ I get the error:
Notice: Undefined variable: submitform in C:\www\emailform.php on line 9 and when I use: if($_POST["submitform"]) or if($HTTP_POST_VARS["submitform"]) I get the error: Notice: Undefined index: submitform in C:\www\emailform.php on line 9 Does anyone have any more suggestions? Thanks Brad! Luke "Brad Thomas" <[EMAIL PROTECTED]> wrote in message news:20021104020732.94208.qmail@;pb1.pair.com... > Hi > > "Luke" <[EMAIL PROTECTED]> wrote in message > news:20021103231622.13841.qmail@;pb1.pair.com... > > I am trying to submit a form on my apache server running win2k and php4 > > using php, but I get the error: > > > > Notice: Undefined variable: submitform in C:\www\\emailform.php on line 9 > > > > The exact same php script works on another server running > linux/apache/php4 > > > > Does anyone know if I need to load any extensions in my php.ini file in > > order for php to receive variables defined in an html form? Or maybe what > > else might be the problem? > > > > here are the lines around line 1-20: > > > > <HTML> > > <HEAD> > > <TITLE>Email</TITLE> > > </HEAD> > > <BODY BGCOLOR="#ffffff"> > > <?php > > $youremail = "[EMAIL PROTECTED]"; > > $subject = "Contact Form"; > > if($submitform) { > > $dcheck = explode(",",$require); > > while(list($check) = each($dcheck)) { > > if(!$$dcheck[$check]) { > > $error .= "Missing $dcheck[$check]<BR>"; > > } > > > > > > > > Thanks! > > > > Luke :) > > } > > > > > > This is due to a setting in your php.ini file > > register_globals: off > > If this is the case, variables that come from a form need to be accessed by > the superglobals (PHP 4.2+) ie $_POST["variablename"]; > > OR > the HTTP vars.. $HTTP_POST_VARS["variablename"]; > > HTH > Brad > > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php