Hi Edon,
I am not so new to this anymore ;-)
It depends a little on what you want to display after updating. i suppose there is a form involved?
I usually have a set ov variables defining the header, body and footer of my pages. :
$head
$footer
$body
The first two I load from files, which holds all sort of universal settings, so I do not need to update them in every page if I decide I want to change some includes, passwords etcetc.
Anyway.. The page ends with:
echo $head;
echo $body;
echo $footer;
Now when loading the page, you can start with checking wether a form has been submitted. I do this by including a hidden variable in the form:
<form action=***Thispage*** method=POST name=form1>
<input type=hidden name=form1action value=update>
</form>
And placing this section of php in the phpcode:
if($_POST['form1action'] == 'update');
{
here all your update routines & $body = something
}
else
{
$body = "YourForm";
}
/* From here you can place any other code to get the page. You could even decide not to place the $body=YourForm in the else lop, but just afterwards.
*/
So not you have it all in one page.
Hope this helps?
J