i have a template in which i have a variable called $body.
i have created a file called register.php in which i call the template and set the $body variable to an html table.
in this html table i have a hidden field called registerinfo i want to use this variable as a flag so i can either show the html table if the user hasen't registered yet and if he presses the register button i call the register.php file again and now i want insted of the html table a simple text saying register succesfull.
this is what i did:
Code: Select all
extract($_POST);
if (empty($registerinfo))
{
$registerinfo="1";
$body=$registerTable;
}
else
{
$body="<font size=1px><b>You have succesfuly registerd<br>";
}
include_once("template.php");
and if someone could explain to me the difference between include and include_once i would be happy.
what should i use? as they both work with no problem.
thanks for the help