title: Failure to display result of a php script calculation in the textarea box
body: <p>I believe that my problem may lie in the way that I am trying to initialize the script. The submit button that I am using seems to just clear the form, and not display any results. I also think there may be a problem with the two lines " $message = $_POST['textarea'];" and "echo $result + $message;" I am not sure if that is the correct way to produce a result into a text area box, as well as display the miles driven and total cost in their separate text boxes. I want this one button to do all three tasks. Is there a way to do this efficiently with PHP?</p>
  
  <p>Edit: Corrected version of the code. Thank you @Fred-ii-!</p>
  
  <pre><code>&lt;?php
      if(isset($_POST['submit'])) {
      $x = $_POST['beginningOdometerReading'];
      $y = $_POST['endingOdometerReading'];
      $z = $_POST['daysRentedCar'];
      $miles = $y - $x; 
      $result = (15 * $z) + ($miles * 0.12);
      $message = $_POST['textarea'];
    echo $result + $message; } 
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;div align="center"&gt;
  &lt;hr&gt;&lt;br&gt;
  &lt;form action="index4.php" method="post" name id="Main"&gt;
  &lt;input type="text" id="name" name="customerName" placeholder="Enter your name here" size="30px"&gt;   
  &lt;br&gt;&lt;br&gt;
  &lt;input type="text" id="address" name="customerAddress" placeholder="Enter your street address here" size="50px"&gt;   
  &lt;br&gt;&lt;br&gt;
  &lt;input type="text" id="city" name="customerCity" placeholder="What city do you live in?" size="30px"&gt;   
  &lt;br&gt;&lt;br&gt;
  &lt;input type="number" id="zip" name="customerZip" placeholder="Enter your zip code" size="30px"&gt;   
  &lt;br&gt;&lt;br&gt;
  &lt;input type="number" id="bOdometer" name="beginningOdometerReading" placeholder="Start odometer reading" size="80px"&gt;   
  &lt;br&gt;&lt;br&gt;
  &lt;input type="number" id="eOdometer" name="endingOdometerReading" placeholder="End odometer reading" width="80px"&gt; 
  &lt;br&gt;&lt;br&gt;
  &lt;input type="number" id="daysRented" name="daysRentedCar" placeholder="Days rented" size="50px"&gt;  
  &lt;br&gt;&lt;br&gt;
  
  &lt;input type="submit" id="submit" value="Submit"/&gt;
  &lt;br&gt;&lt;br&gt;
  Miles Driven: &lt;input type="number" id='miles' min="1" max"10000" readonly="" /&gt;
  Total Cost: &lt;input type="number" id='result' min="1" max"10000" readonly="" /&gt;
  &lt;br&gt;&lt;br&gt;
  Summary: &lt;textarea cols="30" rows="2" name="thetextarea" id="textarea"&gt;     &lt;/textarea&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;input type="reset" value="Reset"&gt;
  &lt;/form&gt;       
  &lt;hr&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  </code></pre>