Q:

Having an issue passing a variable from a while mysqli_fetch_array loop to another page so I can use it with $_GET on the other side

Hello I am trying to use $_GET to pass a variable over to the contact.php page mentioned, but the outcome is:

/contact.php?firstname=

this is the link that im clicking to send the variable:
echo '<a href="contact.php?name="' . $email . '">';

This is the code to get the variable on the other side:
 <?php
      $name = $_GET['name'];
      echo $name ;
    ?>

A:

You are closing the href attributes value before you should be.
echo '<a href="contact.php?name="' . $email . '">';
                                ^ 

You need to remove that double quote so the value comes out in the attribute. As written currently your HTML will be:
<a href="contact.php?name=" email@example.com">

so use:
echo '<a href="contact.php?name=' . $email . '">';

