I have a form. I have error-catching set up for the form inputs. And in the form, I use the <h3> tage to position a captcha. the bottom part of my form looks like this:
[code=html]
<form method=”post” class=”subform” action=”<?php echo htmlentities($_SERVER[‘PHP_SELF’]);?>”>
…
<p>
<label for=”pwd2″ class=”label”>Confirm Password:</label>
<input type=”password” name=”pwd2″ placeholder=”Confirm Password” value=”<?php if (isset($_POST[‘pwd2’])) { echo $pwd2; } ?>”>
<span class=”error”> <?php echo $pwd2Err;?></span>
</p>
<?php
echo ‘<h3>’.$funcaptcha->getFunCaptcha(“XXXXXXXX-XXXX-6849-XXXXX-XXXXXXXXXXXX”).'</h3>’;
?>
<input type=”submit” value=”Register”></button>
When an input error occurs, the error text is placed next to the input box. I like that. But I don’t know how to setup and display an error next to the captcha if the user fails to complete it. So I’ve been using $pwd2Err to tell the user it has to be be completed, but using that places the error msg next to the Confirm Password textbox, instead of next to the captcha where it should be. And for all I know, I may be in the wrong forum with this being a CSS issue instead ?
Any ideas how I might get the error message attached to the captcha and display it accordingly?