Add the following statement for a few days and the page will become blank, delete it normally
echo "isset($tireqty)".isset($tireqty)."
";
echo "isset($nothere)".isset( $nothere)."
";
echo "isset($tireqty)".empty($tireqty)."
";
echo "isset($nothere)".empty( $nothere)."
";
The complete code is listed below
<code> <head> <title>Bob's Auto Parts -Order Result</title> </head> <body> <h1>Bos's Auto Parts</h1> <h2>Order Result</h2> <?php define('TIREPRICE',100); define('OILPRICE',10); define('SPARKPRICE',4); $tireqty = $_POST['tireqty']; $oilqty = $_POST['oilqty']; $sparkqty = $_POST['sparkqty']; echo " <p>Order processed at".date('H:i, jS F Y')."</p>"; echo " <p>Your order is as follow:</p>"; echo $tireqty." tireqty<br/>"; echo $oilqty." oilqty<br/>"; echo $sparkqty." spark plugs <br/>"; $totalqty = 0; $totalqty = $tireqty + $oilqty + $sparkqty; echo "Items ordered: ".$totalqty."<br/>"; $totalamount = 0.00; $totalamount = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE; echo "Subtotal: $".number_format($totalamount,2)."<br/>"; $taxrate = 0.10; //total sales tax is 10% $totalamount = $totalamount * (1 + $taxrate); echo "Total including tax: $".number_format($totalamount,2)."<br/>"</code>
// echo "isset($tireqty)".isset($tireqty)."
";
// echo "isset($nothere)".isset($nothere)."
";
// echo "isset($tireqty)".empty($tireqty)."
";
// echo "isset($nothere)".empty($nothere)."
";
<code> ?> </body></code>
Add the following statement for a few days and the page will become blank, delete it normally
echo "isset($tireqty)".isset($tireqty)."
";
echo "isset($nothere)".isset( $nothere)."
";
echo "isset($tireqty)".empty($tireqty)."
";
echo "isset($nothere)".empty( $nothere)."
";
The complete code is listed below
<code> <head> <title>Bob's Auto Parts -Order Result</title> </head> <body> <h1>Bos's Auto Parts</h1> <h2>Order Result</h2> <?php define('TIREPRICE',100); define('OILPRICE',10); define('SPARKPRICE',4); $tireqty = $_POST['tireqty']; $oilqty = $_POST['oilqty']; $sparkqty = $_POST['sparkqty']; echo " <p>Order processed at".date('H:i, jS F Y')."</p>"; echo " <p>Your order is as follow:</p>"; echo $tireqty." tireqty<br/>"; echo $oilqty." oilqty<br/>"; echo $sparkqty." spark plugs <br/>"; $totalqty = 0; $totalqty = $tireqty + $oilqty + $sparkqty; echo "Items ordered: ".$totalqty."<br/>"; $totalamount = 0.00; $totalamount = $tireqty * TIREPRICE + $oilqty * OILPRICE + $sparkqty * SPARKPRICE; echo "Subtotal: $".number_format($totalamount,2)."<br/>"; $taxrate = 0.10; //total sales tax is 10% $totalamount = $totalamount * (1 + $taxrate); echo "Total including tax: $".number_format($totalamount,2)."<br/>"</code>
// echo "isset($tireqty)".isset($tireqty)."
";
// echo "isset($nothere)".isset($nothere)."
";
// echo "isset($tireqty)".empty($tireqty)."
";
// echo "isset($nothere)".empty($nothere)."
";
<code> ?> </body></code>
If the previous quote variable $nothere is not defined, an error will be reported. If you do not turn on the debug mode, the error will not be reported and will not be displayed.
isset and empty return bool types, so naturally they will not be displayed.
echo "isset($tireqty)"...If $tireqty is not defined, an error will occur, because the isset in double quotes here is output as a character
error_reporting(E_ALL);
ini_set("display_errors", 1);
Add to top of page