/    Sign up×
Community /Pin to ProfileBookmark

How do I do this?

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>
[/code]

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?

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@NogDogFeb 04.2015 — Can you stick the error message within that <h3> tag, maybe within its own <span> so you can style it as desired?
×

Success!

Help @Landslyde spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.21,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...