Hi dears

I have a little question about the best logical way to display error messages when a user forgot to fill in a form field. I am trying to avoid the awful 'echo-blank-page' solution here. I have been trying a few things instinctively, but I think that I need a little boost here from more knowledgeable people than me.

Here we go (that's my actual code, in progress, and that's as far as I can go by myself):
PHP Code:
//if the member has submitted the text to be edited yet.


if ( isset(
$_POST['edit']) ) {
//just a patanoid check.
if ( $_POST['userID'] != $_SESSION['userID'] ) {
//check that the fields are not empty
if ( ($_POST['title']='') or ($_POST['text']!='') ) {
$error .= 'Please make sure that you have filled in all the fields.';
$errorCheck true;
$sql =
"UPDATE userstexts 
             textTitle = '
             , textText = '
             , newAdmin = 1
             textID = 
             AND userID = 


//if the member has not submitted the text to be edited yet.
if ( !isset($_POST['edit']) ) {
//**********checks that both textID and userID are set, if not, log out!**********
if ( (!isset($_GET['textID'])) or (!isset($_SESSION['userID'])) ) {

$sql =
    , textTitle
    , textText 
    FROM userstexts 
    WHERE textID = 
    AND userID = 

//**********the users must have texts to edit**********
    //**********if he tries to access this page without any texts to edit,**********
    //**********he gets logged out.**********
if ( $result->size() == ) {
$row $result->fetch(); 
and here is the form (in the same page) with the error message to display:
PHP Code:
            <form action="<?=$_SERVER['PHP_SELF']?>" method="POST">
            <div class="quickReply">
                <p class="centre" style="text-align:centre;">
                <input type="text" name="title" id="title" value="<?=$row['textTitle']?>" />
                <p class="centre" style="text-align:centre;">
                <textarea rows="10" cols="30" name="text" id="text"><?=$row['textText']?></textarea>
                <input type="hidden" name="textID" value="<?=$textID?>" />
                <input type="hidden" name="userID" value="<?=$userID?>" />
                <p class="centre" style="text-align:centre;">
                <input type="submit" name="edit" value="edit" />
thanks in advance for your help