Re: a couple of problems with PHP form
| From: | Mark Rees | Date: | Mon, 17 Oct 2005 10:32:17 +0000 |
| Subject: | Re: a couple of problems with PHP form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-224218@lists.php.net to get a copy of this message | ||
-----------------------------------------------------
sorry, my editor has not indented again
-----------------------------------------------------
also, I want the field to appear hilighted when there is no
information so I am doing this:
<input class="<? if($error_msg){ echo "error"; } ELSE { echo
"normal"; } id="firstname" name="firstname" type="text"
value="{$_POST['firstname']}"? />"
and I have an error class set up in my CSS, such as
.error {border: 1px solid red;}
this is not doinf anything either.
-----------------------------------------------------
Assuming that your test for $error_msg is working correctly, change the css
definition to
input.error
-----------------------------------------------------