So, I have what I believe is some really simple php/html code. I just do not understand how the _construct() method isn’t executing before the HTML form. Can someone please give me an explanation.
Code from my page:
<?php class register {
function __construct() {
echo 'SYSTEM: This is the register page';
}
}
?>
<form action="http://abc.org/test" method="POST">
<input type="username" value="">
<input type="password" value="">
<input type="submit" value="Register">
</form>
How it looks:

EDIT
Sorry for not including this in the original post, but I’m creating the class from another page.
Page abc.com/a has this code:
<?php require './'.'register'.'.php';
$obj = new register; ?>
The code at the top of this question is from register.php
The class code will run after the form, because after your
requireline the form has already been output. Only then you instance the class, whose constructor echoes the message.If you want to echo before the form, just instance the class right after you define it: