otuatail Posted January 31, 2007 Share Posted January 31, 2007 Can someone tell me if there is a limit to $_POST. I have 12 text boxes on a form but i can't retreve the last one. There is no spellinf mistake or case sensitive problems. i have renamed the text box several times but nothing.Desmond. Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 No there is not.At the top of your processing page, addprint_r($_POST); and you will see all of the posted variables.If you still can't get it, post the HTML and PHP. Quote Link to comment Share on other sites More sharing options...
otuatail Posted January 31, 2007 Author Share Posted January 31, 2007 Thanks I have tried print_r($_POST);the last texbox is missing and I have at the end [submit] => Calculate ) If I do Post the php page, how. Last time I tried this it came out on the group as a html page or something.Desmond. Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 Click the reply button instead of using quick reply. Copy and paste all the text into this form, including your opening <?php tags. Then highlight all the code, and press the # button. This will put it in code tags. This makes it easy for us to read and help you. Quote Link to comment Share on other sites More sharing options...
otuatail Posted January 31, 2007 Author Share Posted January 31, 2007 Line 38 is the text boxx Lines 77-79 use the postPage = http://www.des-otoole.co.uk/utility2/utility_compare.phpcode = #<?$stamp = time();$val = date("d-m-Y H:i:s",$stamp);//echo($val);print_r($_POST);// echo $randval = rand();?><html><title>Utility</title><body><form action="utility_compare.php" method="post"><table border="0"><tr><td colspan="2" align="center" height="50"><b><u>UN-Capped</u></b><td width="30"></td><td colspan="2" align="center" height="50"><b><u>Capped</u></b></tr><td width="30"></td><tr><td colspan="5" align="center"><b>Electric Reading</b></tr><tr><td>High p </td><td><input type="text" name="E_U_High" value="12.702" size="4"></td><td></td><td>High p </td><td><input type="text" name="E_C_High" value="12.970" size="4"></td><td></td><td>Units </td><td><input type="text" name="E_Units" value="4844" size="4"></td></tr><tr><td>Low p </td><td><input type="text" name="E_U_Low" value="7.292" size="4"></td><td></td><td>Low p </td><td><input type="text" name="E_C_Low" value="5.560" size="4"></td></tr><tr><td colspan="6"><hr></tr><tr><td colspan="6" align="center"><b>Gas Reading</b></tr><tr><td>High p </td><td><input type="text" name="G_U_High" value="3.422" size="4"></td><td></td><td>High p </td><td><input type="text" name="G_C_High" value="2.912" size="4"></td><td></td><td>Units </td><td><input type="text" name="G_Units" value="480" size="4"></td></tr><tr><td>Low p </td><td><input type="text" name="G_U_Low" value="2.417" size="4"></td><td></td><td>Low p </td><td><input type="text" name="G_C_Low" value="1.619" size="4"></td><td></td><td>Kwh </td><td><input type="text" name="G_Kwh" value="11.52" size="4"></td></tr><tr><td colspan="6"><hr></tr><tr><td colspan="5" align="center"><input type="submit" value="Calculate" Name="submit" </td></tr></table><?// Electric Uncapped *******if($_POST['E_Units'] > 900) { $E_High_Units = 900; $E_Low_Units = $_POST['E_Units'] - 900; }else { $E_High_Units = $_POST['E_Units']; $E_Low_Units = 0; }if($_POST['G_Units'] > 100) { $G_High_Units = 100; $G_Low_Units = $_POST['G_Units'] - 100; }else { $G_High_Units = $_POST['G_Units']; $G_Low_Units = 0; }// Electric Uncapped *******$E_U_High_val = $_POST['E_U_High'] * $E_High_Units / 100;$E_U_Low_val = $_POST['E_U_Low'] * $E_Low_Units / 100;// Electric Capped ********$E_C_High_val = $_POST['E_C_High'] * $E_High_Units / 100;$E_C_Low_val = $_POST['E_C_Low'] * $E_Low_Units / 100;// GAS Uncapped *******$_KWH = $_POST['G_Kwh'];$_KWH = '11.52'; //Use this insteadecho '$_KWH = ' . $_KWH;$G_U_High_val = $_POST['G_U_High'] * $G_High_Units / 100 * $_KWH;$G_U_Low_val = $_POST['G_U_Low'] * $G_Low_Units / 100 * $_KWH;// GAS Capped *******$G_C_High_val = $_POST['G_C_High'] * $G_High_Units / 100 * $_KWH;$G_C_Low_val = $_POST['G_C_Low'] * $G_Low_Units / 100 * $_KWH;$Uncap_total = $E_U_High_val + $E_U_Low_val + $G_U_High_val + $G_U_Low_val;$Cap_total = $E_C_High_val + $E_C_Low_val + $G_C_High_val + $G_C_Low_val;if($Cap_total > 0) $Percent = ($Uncap_total - $Cap_total) / $Cap_total * 100;else $Percent = 0;?><table border="0"><tr><td><?=$E_High_Units?> * <?=$_POST['E_U_High']?> = </td><td>£<?=money_format("%4.2n",$E_U_High_val)?></td></tr><tr><td><?=$E_Low_Units?> * <?=$_POST['E_U_Low']?> = </td><td>£<?=money_format("%3.2n", $E_U_Low_val)?></td></tr><tr><td width="80">Total</td><td>£<?=money_format("%3.2n", ($E_U_High_val + $E_U_Low_val))?></td></tr><tr><td colspan="2"><hr></td></tr><tr><td><?=$G_High_Units?> * <?=$_POST['G_U_High']?> = </td><td>£<?=money_format("%3.2n", $G_U_High_val)?></td></tr><tr><td><?=$G_Low_Units?> * <?=money_format("%3.3n", $_POST['G_U_Low'])?> = </td><td width="80">£<?=money_format("%3.2n", $G_U_Low_val)?></td></tr><tr><td>Total </td><td>£<?=money_format("%3.2n", $G_U_High_val + $G_U_Low_val)?></td><td>£<?=money_format("%3.2n", ($Uncap_total))?></td><td><b>UN-Capped</b><td></tr><tr><td colspan="3" height="30"><hr></td></tr><tr><td><?=$E_High_Units?> * <?=$_POST['E_C_High']?> = </td><td>£<?=$E_C_High_val?></td></tr><tr><td><?=$E_Low_Units?> * <?=money_format("%10.2n", $_POST['E_C_Low'])?> = </td><td>£<?=money_format("%3.2n", $E_C_Low_val)?></td></tr><tr><td>Total</td><td>£<?=money_format("%3.2n", $E_C_High_val + $E_C_Low_val)?></td></tr><tr><td colspan="2"><hr></td></tr><tr><td><?=$G_High_Units?> * <?=$_POST['G_C_High']?> = </td><td>£<?=money_format("%3.2n", $G_C_High_val)?></td></tr><tr><td><?=$G_Low_Units?> * <?=$_POST['G_C_Low']?> = </td><td>£<?=money_format("%3.2n", $G_C_Low_val)?></td></tr><tr><td>Total </td><td>£<?=money_format("%3.2n", ($G_C_High_val + $G_C_Low_val))?></td><td>£<?=money_format("%3.2n", $Cap_total)?></td><td><b>Capped</b><td></tr><tr><td>£<?=money_format("%3.2n",($Uncap_total - $Cap_total))?></td><td><?=money_format("%3.2n",$Percent)?>%</td></tr></table></form></body></html># Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 No, the # button in the list of buttons. Not the key on your keyboard, the BBCode Buttons! Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 You know you have several inputs with the same name, right?Anyway, when I do it, the box on line 38 shows up in the list.Array ( [E_U_High] => 12.702 [E_C_High] => 12.970 [E_Units] => 4844 [E_U_Low] => 7.292 [E_C_Low] => 5.560 [G_U_High] => 3.422 [G_C_High] => 2.912 [G_Units] => 480 [G_U_Low] => 2.417 [G_C_Low] => 1.619 [G_Kwh] => 12 [submit] => Calculate ) Quote Link to comment Share on other sites More sharing options...
otuatail Posted January 31, 2007 Author Share Posted January 31, 2007 Sorry never done this before is this right?Line 38 is the text box Lines 77-79 use the postI can't see any duplication of name of text boxesPage = http://www.des-otoole.co.uk/utility2/utility_compare.phpcode =[code]<?$stamp = time();$val = date("d-m-Y H:i:s",$stamp);//echo($val);print_r($_POST);// echo $randval = rand();?><html><title>Utility</title><body><form action="utility_compare.php" method="post"><table border="0"><tr><td colspan="2" align="center" height="50"><b><u>UN-Capped</u></b><td width="30"></td><td colspan="2" align="center" height="50"><b><u>Capped</u></b></tr><td width="30"></td><tr><td colspan="5" align="center"><b>Electric Reading</b></tr><tr><td>High p </td><td><input type="text" name="E_U_High" value="12.702" size="4"></td><td></td><td>High p </td><td><input type="text" name="E_C_High" value="12.970" size="4"></td><td></td><td>Units </td><td><input type="text" name="E_Units" value="4844" size="4"></td></tr><tr><td>Low p </td><td><input type="text" name="E_U_Low" value="7.292" size="4"></td><td></td><td>Low p </td><td><input type="text" name="E_C_Low" value="5.560" size="4"></td></tr><tr><td colspan="6"><hr></tr><tr><td colspan="6" align="center"><b>Gas Reading</b></tr><tr><td>High p </td><td><input type="text" name="G_U_High" value="3.422" size="4"></td><td></td><td>High p </td><td><input type="text" name="G_C_High" value="2.912" size="4"></td><td></td><td>Units </td><td><input type="text" name="G_Units" value="480" size="4"></td></tr><tr><td>Low p </td><td><input type="text" name="G_U_Low" value="2.417" size="4"></td><td></td><td>Low p </td><td><input type="text" name="G_C_Low" value="1.619" size="4"></td><td></td><td>Kwh </td><td><input type="text" name="G_Kwh" value="11.52" size="4"></td></tr><tr><td colspan="6"><hr></tr><tr><td colspan="5" align="center"><input type="submit" value="Calculate" Name="submit" </td></tr></table><?// Electric Uncapped *******if($_POST['E_Units'] > 900) { $E_High_Units = 900; $E_Low_Units = $_POST['E_Units'] - 900; }else { $E_High_Units = $_POST['E_Units']; $E_Low_Units = 0; }if($_POST['G_Units'] > 100) { $G_High_Units = 100; $G_Low_Units = $_POST['G_Units'] - 100; }else { $G_High_Units = $_POST['G_Units']; $G_Low_Units = 0; }// Electric Uncapped *******$E_U_High_val = $_POST['E_U_High'] * $E_High_Units / 100;$E_U_Low_val = $_POST['E_U_Low'] * $E_Low_Units / 100;// Electric Capped ********$E_C_High_val = $_POST['E_C_High'] * $E_High_Units / 100;$E_C_Low_val = $_POST['E_C_Low'] * $E_Low_Units / 100;// GAS Uncapped *******$_KWH = $_POST['G_Kwh'];$_KWH = '11.52'; //Use this insteadecho '$_KWH = ' . $_KWH;$G_U_High_val = $_POST['G_U_High'] * $G_High_Units / 100 * $_KWH;$G_U_Low_val = $_POST['G_U_Low'] * $G_Low_Units / 100 * $_KWH;// GAS Capped *******$G_C_High_val = $_POST['G_C_High'] * $G_High_Units / 100 * $_KWH;$G_C_Low_val = $_POST['G_C_Low'] * $G_Low_Units / 100 * $_KWH;$Uncap_total = $E_U_High_val + $E_U_Low_val + $G_U_High_val + $G_U_Low_val;$Cap_total = $E_C_High_val + $E_C_Low_val + $G_C_High_val + $G_C_Low_val;if($Cap_total > 0) $Percent = ($Uncap_total - $Cap_total) / $Cap_total * 100;else $Percent = 0;?><table border="0"><tr><td><?=$E_High_Units?> * <?=$_POST['E_U_High']?> = </td><td>£<?=money_format("%4.2n",$E_U_High_val)?></td></tr><tr><td><?=$E_Low_Units?> * <?=$_POST['E_U_Low']?> = </td><td>£<?=money_format("%3.2n", $E_U_Low_val)?></td></tr><tr><td width="80">Total</td><td>£<?=money_format("%3.2n", ($E_U_High_val + $E_U_Low_val))?></td></tr><tr><td colspan="2"><hr></td></tr><tr><td><?=$G_High_Units?> * <?=$_POST['G_U_High']?> = </td><td>£<?=money_format("%3.2n", $G_U_High_val)?></td></tr><tr><td><?=$G_Low_Units?> * <?=money_format("%3.3n", $_POST['G_U_Low'])?> = </td><td width="80">£<?=money_format("%3.2n", $G_U_Low_val)?></td></tr><tr><td>Total </td><td>£<?=money_format("%3.2n", $G_U_High_val + $G_U_Low_val)?></td><td>£<?=money_format("%3.2n", ($Uncap_total))?></td><td><b>UN-Capped</b><td></tr><tr><td colspan="3" height="30"><hr></td></tr><tr><td><?=$E_High_Units?> * <?=$_POST['E_C_High']?> = </td><td>£<?=$E_C_High_val?></td></tr><tr><td><?=$E_Low_Units?> * <?=money_format("%10.2n", $_POST['E_C_Low'])?> = </td><td>£<?=money_format("%3.2n", $E_C_Low_val)?></td></tr><tr><td>Total</td><td>£<?=money_format("%3.2n", $E_C_High_val + $E_C_Low_val)?></td></tr><tr><td colspan="2"><hr></td></tr><tr><td><?=$G_High_Units?> * <?=$_POST['G_C_High']?> = </td><td>£<?=money_format("%3.2n", $G_C_High_val)?></td></tr><tr><td><?=$G_Low_Units?> * <?=$_POST['G_C_Low']?> = </td><td>£<?=money_format("%3.2n", $G_C_Low_val)?></td></tr><tr><td>Total </td><td>£<?=money_format("%3.2n", ($G_C_High_val + $G_C_Low_val))?></td><td>£<?=money_format("%3.2n", $Cap_total)?></td><td><b>Capped</b><td></tr><tr><td>£<?=money_format("%3.2n",($Uncap_total - $Cap_total))?></td><td><?=money_format("%3.2n",$Percent)?>%</td></tr></table></form></body></html>[/code] Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 <td>High p </td><td><input type="text" name="E_U_High" value="12.702" size="4"></td><td></td><td>High p </td><td><input type="text" name="E_C_High" value="12.970" size="4"></td><td></td>Those two have the same name, as do many others.Which is the one that isn't showing up for you? I see all of them. Line 38 is the "G_Kwh" one, which is in the POST array I copied. It works fine... Quote Link to comment Share on other sites More sharing options...
otuatail Posted January 31, 2007 Author Share Posted January 31, 2007 I am not sure what you mean is name="E_U_High" the same as name="E_C_High"the letter C is not the same as the letter UI have used this on other pages and print_r($_POST); displays different values.??? Quote Link to comment Share on other sites More sharing options...
Jessica Posted January 31, 2007 Share Posted January 31, 2007 Right, I thought both were U. Either way, what is the MISSING one? I have asked several times exactly which one you think is missing, and you keep saying Line 38. Well, I told you the input named in line 38 is IN the $_POST. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.