title: Simple passing of input to a button onClick
body: <p>So i'm creating a taxi booking app ( mock-up project ) and  am implementing a search bar for searching through a database via sql.
  I've got everything working, but now i want to check if a code is valid in the table, before assigning a taxi driver to it.</p>
  
  <pre><code>$sql = "UPDATE cabBookings SET _status = 'assigned' WHERE _booking_code = '$code'";
  $sqlTwo = "SELECT * FROM cabBookings WHERE _booking_code = '$code'";
  
  if($result = @mysqli_query($connection, $sqlTwo)){
          if($result-&gt;fetchColumn() &gt; 0){
              if (@mysqli_query($connection, $sql)) {
                  echo "&lt;p style = 'padding: 10px; background-color: #8ae57b; border: 1px solid black; max-width: 400px;'&gt;Great! Thankyou
                      for taking up your time. You have been assigned the duty of picking up this passenger :-)&lt;/p&gt;
                      &lt;button style = 'margin-top: 10px;' type = 'button' onClick = 'location.reload()'&gt;Reload Page&lt;/button&gt;";
              } else {
                  echo "Error: " . $sql . "&lt;br&gt;" . $connection-&gt;error;
              }
          }else{
              echo "&lt;p style = 'padding: 10px; background-color: #ed6c63; border: 1px solid black; max-width: 400px;'&gt;Sorry, the code
                      you have entered is not a current booking&lt;/p&gt;";
          }
      }
  </code></pre>
  
  <p>obviously the code isn't working, and i was just wondering what i am doing wrong</p>