![]() |
PHP web page loading problem
I have an html page that has a form that posts to a php page. Aday ago it was working just fine but just recently once the html form is submitted the php page takes a really long time to load and almost always stops responding.
does anyone know how to fix this? yesterday I was playing areound trying to get the html page to post to two different pages(it wasnt working) I have since removed that tho. |
The part where you were "playing around" with the pages' inner working the day earlier doesn't seem like a coincidence. You probably didn't suceed in reverting the page back to it's original state. Have you checked twice for stray code fragments or typos you might have left there?
|
Quote:
also, when I go to my server and preview the php page that it posts to it alone takes a long time to load eventhough its not getting any data posted to it. |
It could be any number of things, which is why details are most important.
Do you mean it is slow to load even when previewing the source? That would be rather strange, since it shouldn't get executed when doing that. |
Quote:
|
pk I have determined that it is this for statement that I have. for some reason it worked yesterday but is not working now. is there a better way to state this?:
<?php $Biscuit = $_POST['BreakfastMenu_0']; $Add_on1 = $_POST['Breakfast_Biscuit_Add_on']; $Quantity1 = $_POST['quantity1']; if($quantity1 > 0): echo $quantity1 . " " . $Biscuit . " with " . $Add_on1 . "<br />"; endif; ?></td> <td id="price"> <?php //selections for buscuit for($quantity1 >0; $Biscuit = true; ){ if($Add_on1 === "plain only-$0.95"): $P1 = "0.95"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "plain with egg & cheese - $1.25"): $P1 = "1.25"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Ham only - $1.50"): $P1 = "1.50"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Ham with egg - $1.75"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Ham with cheese - $1.75"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Ham with egg - $1.75"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Ham with egg & cheese - $2.00"): $P1 = "2.00"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Susage only - $1.50"): $P1 = "1.50"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Sausage with egg - $1.75"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Sausage with cheese"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Sausage with egg & cheese - $2.00"): $P1 = "2.00"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Bacon only - $1.50"): $P1 = "1.50"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Bacon with egg - $1.75"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Bacon with cheese - $1.75"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Bacon with egg & cheese - $2.00"): $P1 = "2.00"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Steak only - $2.00"): $P1 = "2.00"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Steak with cheese - $2.15"): $P1 = "2.15"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Steak with egg - $2.15"): $P1 = "2.15"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Steak with cheese & egg - $2.50"): $P1 = "2.50"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Chicken only - $2.00"): $P1 = "2.00"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Chicken with cheese - $2.15"): $P1 = "1.75"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Chicken with egg - $2.15"): $P1 = "2.15"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Chicken with egg & cheese - $2.50"): $P1 = "2.50"; echo "$" . $P1 * $quantity1 . "<br />"; elseif($Add_on1 === "Select One"): echo "Please choose an add on.<br />"; endif;} |
Okay, well..
$Quantity1 = $_POST['quantity1']; is being defined with a capital letter in it, but all further uses are lowercase.. $quantity1.Variables are documented as case-sensative. |
| All times are GMT +1. The time now is 09:53 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.