--- In [email protected], "urs_umar86" <[EMAIL PROTECTED]> wrote:
>
> Actually i am new in php and mysql.
> i want to display an error on the same page when any validation check
> can occur or i want to display on the top of the page with * mark on
> the effected field.
> please send me a proper code and a little bit explaination about that
>
> Thanks in advanced
>
I think this is what you want to do. hope you get the general idea
from my code.
<?php
# precheck for errors
$error=FALSE;
if($data==''){$error=TRUE;}
echo '<form method="GET">';
# display errors above fields
if($data==''){echo '<p><font color="#ff0000">*this is
required</font></p>';}
echo '<input type="text" name="data" value="">';
echo '<input type="submit">';
echo '</form>';
?>