Why does the php code show in my website page? : <p>I am still new with using PHP, so i am having a problem which is when i run this code, the PHP show in my browser.
I tried saving the file. html and this is the result </p>

<p><a href="https://i.stack.imgur.com/OKUfl.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OKUfl.jpg" alt="File.html"></a></p>

<p>and if I tried to save it .php, this is the result</p>

<p><a href="https://i.stack.imgur.com/tFfxO.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tFfxO.jpg" alt="File.php"></a></p>

<p>and here is my code </p>

<p>Can anyone help me ?!</p>

<p>Code:</p>

<pre><code>&lt;?php

include_once ("php_includes/check_login_status.php");

//If user is already logged in, header it away

if ($member_ok == true)

{
    header ("location: Member.php?u=".$_SESSION["Username"]);

    exit();

}

?&gt;

&lt;?php

//AJAX calls this part to be executed

if ( isset($_POST["e"]))

{
    $e = mysqli_real_escape_string($db_conx, $_POST['e']);

    $sql = "SELECT MmeberID, Username FROM Member WHERE Email='$e' AND activated='1' LIMIT 1";

    $query = mysqli_query($db_conx, $sql);

    $numrows = mysqli_num_rows($query);

    if ($numrows &gt; 0) // The member exists 

    {

        while($row = mysqli_fetch_array($query, MYSQLI_ASSOC))

        {

            $id = $row["id"];

            $u = $row["username"];

        }

        $emailcut = substr($e, 0, 4); //Cut the first 4 character of their mail

        $randNum = rand(10000,99999); // generate 5 digits random number

        $tempPass = "$emailcut$randNum"; //concatinate these two var to make the new random pass

        $hashTempPass = md5($tempPass); //hash this new random password

        $sql = "UPDATE Member SET temp_pass='$hashTempPass' WHERE Username='$u' LIMIT 1"; //Update the member table with the new password

        $query = mysqli_query($db_conx, $sql);

        $to = "$e"; 

        $from = "IT_Department@8bits.com";

        $headers ="From: $from\n";

        $subject ="yoursite Temporary Password";

        $msg = '&lt;h2&gt;Hello '.$u.'&lt;/h2&gt;

        &lt;p&gt; Somebody recently asked to reset your Facebook password. Didnt request this change? If you didnt request a new password.&lt;/p&gt;

        &lt;p&gt;We can generated a temporary password for you to log in with, then once logged in you can change your password to anything you like.&lt;/p&gt;

        &lt;p&gt;After you click the link below your password to login will be:&lt;br /&gt;&lt;b&gt;'.$tempPass.'&lt;/b&gt;&lt;/p&gt;

        &lt;p&gt;&lt;a href="http://www.yoursite.com/forgot_pass.php?u='.$u.'&amp;p='.$hashTempPass.'"&gt;Click here now to apply the temporary password shown below to your account&lt;/a&gt;&lt;/p&gt;

        &lt;p&gt;If you do not click the link in this email, no changes will be made to your account. In order to set your login password to the temporary password you must click the link above.&lt;/p&gt;';

        if(mail($to,$subject,$msg,$headers)) 

        {

            echo "success";

            exit();

        } 

        else 

        {

            echo "email_send_failed";

            exit();

        }
    } 

    else 

    {

        echo "no_exist";

    }

    exit();

}

?&gt;
</code></pre>



<pre><code>&lt;!DOCTYPE html&gt;

&lt;html&gt;

    &lt;header id = "PageHeader"&gt;

        &lt;script type="text/javascript" src = "Index.js"&gt; &lt;/script&gt;

        &lt;meta charset="utf-8"&gt;

        &lt;!-- The website title --&gt;

        &lt;TITLE&gt; 8 BITES &lt;/TITLE&gt;

        &lt;!-- Include the CSS file with this HTML file--&gt;

        &lt;link rel="icon" type="iamge/x-icon" href="C:/Users/hp1/Desktop/Website/Pictures/Logo.jpg"&gt;

        &lt;link rel="stylesheet" type="text/css" href="Style.css"&gt;

        &lt;img id = "HeaderLogo" src = "C:/Users/hp1/Desktop/Website/Pictures/T_Logo.jpg" alt="Logo" style="width:46px; height:46px;"&gt;

        &lt;h2 id = "HeaderQuote"&gt; 8BITS &lt;/h2&gt;

    &lt;/header&gt;

    &lt;body id ="ForgetPasswordPageBody"&gt;

        &lt;?php include_once("template_pageTop.php"); ?&gt;

        &lt;h1&gt; Generate temporary log in password &lt;/h1&gt;

        &lt;p&gt; Note: This password will last only for 24 hours. In orde to obtain a new valid password please contact us! &lt;/p&gt;

        &lt;form id = "ForgotPassForm"&gt;

            &lt;div id = "Step1"&gt; Step 1: Enter your Email! &lt;/div&gt;

            &lt;input id = "Email" type="Email" onfocus="_('status').innerHTML ='';" maxlength="100"&gt;

            &lt;br/&gt;

            &lt;button id = "ForgotPass" onclick="ForgotPass()"&gt; Generate &lt;/button&gt;

            &lt;p id = "status"&gt; &lt;/p&gt;

        &lt;/form&gt;

        &lt;script&gt;

            function ForgotPass()

            {

                var email = ("Email").value;

                if (email == " ")

                {

                    _("status").innerHTML = "Type your Email address!";

                }

                else 

                {

                    _("ForgotPass").style.display = "none";

                    _("status").innerHTML = 'Please wait...';

                    var ajax = ajaxObj ("POST", "forgot_pass.php");

                    ajax.onreadystatechange = function ()

                    {

                        if (ajaxRetrun (ajax) == true)

                        {

                            var response = ajax.responseText;

                            if (response == "success")

                            {

                                _("ForgotPassForm").innerHTML = '&lt;h3&gt; Step 2. Check your Email inbox please &lt;/h3&gt;';

                            }

                            else if (response == "no_exist")

                            {

                                _("status").innerHTML = "This is Email is not registered!";

                            }

                            else if (response =="email_send_falied")

                            {

                                _("status").innerHTML = "Mail falid to be sent!";

                            }

                            else 

                            {

                                _("status").innerHTML = "An unknow error occured!";
                            }

                        }
                    }

                    ajax.send ("e=" +e);
                }

            }

        &lt;/script&gt;

        &lt;?php include_once("template_pageBottom.php"); ?&gt;

    &lt;/body&gt;

    &lt;footer id = "PageFooter"&gt;

        &lt;div id = "Info"&gt;

            &lt;ul id = "InfoLinks"&gt; 

                &lt;li&gt; &lt;a href ="AboutPage.html" target="_blank"&gt; About &lt;/a&gt; &lt;/li&gt;                        

                &lt;li&gt; &lt;a href ="HelpPage.html" target="_blank"&gt; Help &lt;/a&gt; &lt;/li&gt;

                &lt;li&gt; &lt;a href ="TermsPage.html" target="_blank"&gt; Terms &lt;/a&gt; &lt;/li&gt;

                &lt;li&gt; &lt;a href ="PrivacyPage.html" target="_blank"&gt; Privacy &lt;/a&gt; &lt;/li&gt;

                &lt;li&gt; &lt;a href ="CookiesPage.html" target="_blank" &gt; Cookies &lt;/a&gt; &lt;/li&gt;

                &lt;li&gt; &lt;a href ="AddsInfoPage.html" target="_blank"&gt; Adds Info &lt;/a&gt; &lt;/li&gt;

                &lt;li&gt;  @2017 8Bits  &lt;/li&gt;

            &lt;/ul&gt;

        &lt;/div&gt;

        &lt;div id = "Media"&gt;

            &lt;ul id = "MediaLinks"&gt; 

                &lt;li&gt; &lt;a href ="https://www.facebook.com/MIU8BITS/" target="_blank"&gt; &lt;img src = "C:/Users/hp1/Desktop/Website/Pictures/Facebook.jpg" alt="Facebook" style="width:40px;height:40px;"&gt; &lt;/a&gt; &lt;/li&gt;      

                &lt;li&gt; &lt;a href ="#" target="_blank"&gt; &lt;img src = "C:/Users/hp1/Desktop/Website/Pictures/YouTube.jpg" alt="YouTube" style="width:40px;height:40px;"&gt; &lt;/a&gt; &lt;/li&gt;     

                &lt;li&gt; &lt;a href ="#" target="_blank"&gt; &lt;img src = "C:/Users/hp1/Desktop/Website/Pictures/Instagram.jpg" alt="Instagram" style="width:40px;height:40px;"&gt; &lt;/a&gt; &lt;/li&gt;     

                &lt;li&gt; &lt;a href ="#" target="_blank"&gt; &lt;img src = "C:/Users/hp1/Desktop/Website/Pictures/Twitter.jpg" alt="Twitter" style="width:40px;height:40px;"&gt; &lt;/a&gt; &lt;/li&gt; 

            &lt;/ul&gt;

        &lt;/div&gt;

    &lt;/footer&gt;

&lt;/html&gt;
</code></pre>
