|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
I have a form and I am creating my error checker and I want to make sure that the number of characters in the field isn't >14. I thought the count() would work, but it didn't
since it only works for arrays which I didn't know till after I read the count portion on the manual at PHP.net. So have can I count the number of characters in a string variable with php?![]()
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons |
|
#2
|
|||
|
|||
|
Quote:
PHP Code:
__________________
~ Joe Penn We work for free to help make this a valuable resource on the internet. Do you appreciate the help - did we provide help that will help you prosper and help that has contributed to sharpening your current skill set? Show your appreciation and purchase something from our Amazon Wishlist's - it's simple and a great way to say thank you. |
|
#3
|
|||
|
|||
|
while where on the topic of checking you may want to javascript check it as well, so that they do not have to load a page to tell them that they have done something wrong.
you could use the following javascript to check the form when it is submitted PHP Code:
then in your form tag add this onSubmit="return CheckForm();" |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > Trying to count # of characters in a text input of a form |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|