Q:

Replacing predefined code with user input from html form

I have created a review's website. People visit it and place reviews on it which are turn placed int a database. 
I have created a simple form and area on the website for them to be able to edit and delete their reviews. 
However the code I have to pull their reviews information from the database per user does not work. I am needing to replace "WHERE FirstName='peter'"); with something that allows the script to get and display the reviews that have been submitted with the email the user typed in on the form.
<?php
    $con=mysqli_connect("example.com","peter","abc123","my_db");
    // Check connection
    if (mysqli_connect_errno())
{
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

    $result = mysqli_query($con,"SELECT * FROM Persons
    **WHERE FirstName='Peter'");**

    while($row = mysqli_fetch_array($result))
{
    echo $row['FirstName'] . " " . $row['LastName'];
    echo "<br>";
}

?>

Here is the form html (quite simple and not a lot of work done to it yet) 
<form action="myReviews.php" method="post"> 

<label>Please enter your email:</label>

<input type="email" id="email" name="email" placeholder="email">

<input type="submit" value="submit"> 

</form> 

I have tried and tried to figure this out with using "echos" and everything in between! Please help me out. Google searching it and going to tutorial websites did no good! I will update question with answer once found.
Based on Help from fellow users update below
I edited the php script to read exactly as follows: 
<?php
     $con=mysqli_connect("example.com","peter","abc123","my_db");
     // Check connection
     if (mysqli_connect_errno())
{
     echo "Failed to connect to MySQL: " . mysqli_connect_error();
}

    $result = mysqli_query($con,"SELECT * FROM Persons
    WHERE $email = mysqli_real_escape_string($_POST['email']);");

    while($row = mysqli_fetch_array($result))
{
    echo $row['FirstName'] . " " . $row['LastName'];
    echo "<br>";
}

?>

I am now getting this error in my browser after hitting submit in the form. 
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or         T_VARIABLE or T_NUM_STRING in /home/content/38/10473938/html/review-pratt/business_profiles/myReviews.php on line 106

A:

I think your code has something wrong. Try this:
<?php
$result = mysqli_query($con,sprintf("SELECT * FROM Persons WHERE email = '%s'",mysqli_real_escape_string($con,$_POST['email'])));

