I have the following problem, help me please!!!. php 4.2.2
register globals off apache 1.3.27 windows 2000 internet explorer 6.0 SP1 I have two archives. One that handles the code part, as validating form's inputs and inserting in the data base, and other one is the fill-out form. Inside of the form, includes an field in order to upload a image file . The problem comes when I inputs (submit) image in said field, When uploading it, the variables POST, GET, REQUEST does not identify to the "mode" variable neither to the rests the form's fields. But if not submit an image in that image field, it identifies all the form's variables,. The drive is the following. mode take first the value of "addresi", later changes to the value "insert" when enters in the "print_add_resi_form" function inside of the sentence "switch". The $ME variable take the value of "http://localhost/../residente.php" What can be happening ? /*******************/ residente.php <? include($_SERVER['DOCUMENT_ROOT']."/aruni/config.php"); //require_login(); //require_priv("admin"); $DOC_TITLE = "Lista de Residentes"; include("plantilla/encabezado.php"); echo $_REQUEST["mode"]."<br>"; echo $_GET["mode"]."<br>"; echo $_POST["mode"]."<br>"; echo $_FILES["mode"]."<br>"; echo "<br>"; echo "<br>"; foreach($_REQUEST as $key=>$value){ echo $key."--".$value."<br>"; } echo "<br>"; echo "<br>"; foreach($_POST as $key=>$value){ echo $key."--".$value."<br>"; } echo "<br>"; echo "<br>"; foreach($_GET as $key=>$value){ echo $key."--".$value."<br>"; } echo "<br>"; echo "<br>"; foreach($_FILES as $key=>$value){ echo $key."--".$value."<br>"; } echo "<br>"; echo "<br>"; //echo $_GET."<br>"; //echo $_POST."<br>"; //echo $_FILES."<br>"; //echo $_HTTP_POST_VARS["mode"]; switch ($_REQUEST["mode"]) { case "addresi" : print_add_resi_form(nvl($_REQUEST["category_id"], 1)); break; ... case "insert" : insert_resi($_REQUEST["id"], $_POST, $_FILES["frmmg"]); break; ... default : print_resi_list(); break; } function print_add_resi_form($idresi = 1) { global $ME, $CFG; ... $frm01["mode"] = "insert"; ... include("plantilla/form01.php"); } function insert_resi($id, $form, $formimg){ global $ME, $CFG; .... } /*******************/ /*********************/ form01.php <form method="post" enctype="multipart/form-data" action="<?=$ME?>"> <input type="hidden" name="id" value="<?=$id?>"> <input type="hidden" name="mode" value="<?=$frm01["mode"]?>"> ... <input type="file" name="frmmg"> ... </form> /********************/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php