the html not showing value of php(UPDATED)

Solution:

As per your latest comment:

To get the mailuid from the URL (GET parameters) add the following code to your index.php

<?PHP 
require "header.php";
$mailuid = !empty($_GET['mailuid']) ? $_GET['mailuid'] : null;
// You can also specify the default value to be used instead of `null` if the `mailuid` is not specified in the URL.
?>
<main>
<link rel="stylesheet" type="text/css" href="styl.css">
<div class="wrapper-main">
<section class="section-default">
    <h2><?php echo "$mailuid"?></h2>
 </section>
</div>
</main>
<?php
require "footer.php";
?>

From PHP7 you can use

$mailuid = $_GET['mailuid'] ?? null;

instead of

$mailuid = !empty($_GET['mailuid']) ? $_GET['mailuid'] : null;

Answer

Solution:

The mistake you've made: I think you're confusing forms and file including with how post works.

Let me explain: A form sends data to the server, which is then pushed into the $_POST global variable. You can read this data and use this data easily by echoing or dumping it.

This is what you should do: In this case, your data value will be empty as you're not passing anything to it.

You can solve this by creating a form and passing it to your PHP file.
You can also just require your php script.
Normally you would put data.php in your action, but since you wish to use the variable before you entered the form, you have to include it first.

index.html

<?php require 'data.php'; ?>
<form method="POST" action="">
   <h1>Height: <?=$height?></h1>
   <input type="text" placeholder="Enter the height..." name="height">

   <input type="submit" name="submit" value="Submit">
</form>

data.php

<?php
if (!empty($_POST)) {
    $height = $_POST['height'];
} else {
    $height = 0; //Default height
}

My apologies if i didn't get your question properly.

===========================================

Option B, if this is what you mean, is just doing this:

index.html

<body>
    <div class="container">
       <?php 
       require 'data.php'; //Get the data.php file so we can use the contents
       ?>
       <h1><?php echo $height; ?></h1>
    </div>
</body>

data.php

<?php 
$height = 100; //Height variable

Source