Hello there! It’s my first time posting here!
I’m working through a tutorial in the book “PHP and MySQL Web Development” by Luke Welling and Laura Thomson. I’ve got the following code so far for a form and it works the way that it’s supposed to. For some reason, though, my code editor is highlighting a part of it in red and I would like to know why. I’m using the code editor in the webFTP of Dreamhost. It’s highlighting:
[code]'s Auto Parts
Order Results
<?php echo "<p>Order processed at "[/code]
Here is the entire code:
[code]<?php
//create short variable names
$tireqty = $_POST[‘tireqty’];
$oilqty = $_POST[‘oilqty’];
$sparkqty = $_POST[‘sparkqty’];
?>
Bob's Auto Parts
Order Results
<?php echo "<p>Order processed at ";
echo date('H:i jS F Y');
echo "</p>";
echo "<P>Your order is as follows: </p>";
echo $tireqty.' tires <br>';
echo $oilqty.' bottles of oil <BR>';
echo $sparkqty.' spark plugs <BR>';
define(‘TIREPRICE’, 100);
define(‘OILPRICE’, 10);
define(‘SPARKPRICE’, 4);
$totalqty = 0;
$totalamont = 0.00;
?>
The form is processing correctly. I just want to know why that portion would be highlighted in red. Do you see anything wrong with it or anything that could be “more correct?” Thanks in advance! (By the way, I had no idea what to call this thread!)