alexia
Jun 23 2005, 12:59 PM
| | good day webmasters...
i am in need of a script that will count the inputted characters one will enter... i mean the script must count the number of characters in a textarea as i am entering characters to the textarea..
i know the logic but i cant translate it yet in PHP... so i hope you can help me...
thanks a lot in advance...  |
Reply
guangdian
Jun 23 2005, 01:04 PM
yes,it must be a very simple php script ..i just learning php but i just can not answer it for you.you see,that,your way of using php is not a normal way.i just didn't meet it before.Good luck. Guangdian
Reply
rvalkass
Jun 23 2005, 06:23 PM
There is a PHP function that counts the number of characters in a string: strlen($variable_to_count); I am not sure how you could use this 'live'. If anyone could enlighten me, guangdian and alexia on how to include this 'live' we would be very greatful.
Reply
HmmZ
Jun 24 2005, 12:02 AM
First of all, if your going to attempt to halt further character inputs, there's a much easier way (maxlength=""). as for your "real-time length-check"..: linkIt's a long page, but just scroll to the bottom (Header= "Real-time" JavaScript check) Hope this helps..
Reply
Similar Topics
Keywords : counting characters textarea- Converting Textarea Return Characters To <br />
- (8)
Hi guys, I have set up a form with a textarea. If I have text on multiple lines such as: CODE
here is some content here is some more content then when I print it out as html it will be
returned on one line like so: CODE here is some contenthere is some more content When i
look at the content in the database it looks just like the original way i entered it (contains the
multiple lines). Is there a function in php so that when i spit it out in html it retains the
multiple line format? Thanks in advance. ...
How Would I Go About Making A Simple "counting" Script?
- (3)
Counting Variables?
- (4)
Write a php script that will accept a positive integer, if it is even, divide it by 2 and if it is
odd, multiply it by 3 and add 1. Repeat the process until the value is 1, printing out each value.
Finally print out how many of these operations you performed. If the input value is less than 1,
print error and perform an exit(); For example: Initial value: 9 Next value: 28 Next value: 14
Next value: 7 Next value: 22 Next value: 11 Next value: 34 Next value: 17 Next value: 52 Next
value: 26 Next value: 13 Next value: 40 Next value: 20 Next value: 10 Next value: 5 Nex...
Validation Script - Detecting Illegal Characters
- preg_match to find illegal characters (0)
I'm trying to validate a user's desired username for a registration page. I want to detect
any illegal characters being used for a username. So far i have managed to include most execpt the
'\', the '\' is used for escape and treating the preceding characters
literally. I try to do '\\' but i get an error because it execects another
character. CODE $ck_result = "Default"; $pattern =
"/[!|@|#|$|%|^|&|*|(|)|_|\-|=|+|\||,|.|\/|;|:|\'
;|\"|...
Php Escaped Control Characters And Windows
- they aren't working for me. (3)
In php coding, when you escape certain characters, they have an impact on the output of an
echo'd or printed string. ie "\r\n\t" should give you a new line and a tab before
outputting the content for a line of printing. They vary by OS, I know, but I have tried all the
variations I can think of and can't seem to control output using them. Believe me, I have tried
multiple variations and nothing works for me. I have checked the php.ini file for settings but I
can't find where you can modify them. So the question is : Where do i look to conf...
Converting Characters In A Variable To Individual Values In An Array
- turning variables into arrays (2)
Say I have a variable such as $nav_item and it had to contents Home . IE: CODE
$nav_item = 'Home'; How would I make so that $nav_item was an array and
had the following contents? CODE $nav_item = array ('h', 'o',
'm', 'e'); With the case changing (ie H would become h and U
would become u ) EDIT: Okay found out that I could change the case with
array_change_key_case ($nav_item, CASE_LOWER); ...
Max Characters Is X?
- (3)
I am currently making a code for my phpBB forum, where it will import the latest topics from a
specific forum, and display it on the news section of my main page. But the width of that news
section is very tiny, so I want the code to limit the numbers of characters to 25. So, let's
say this is the full title: "This is the title which is a little too long so it needs to be
shortened." This is what I want to show: "This is the title which ..." How can I do that?...
Looking for counting, characters, textarea
|
|
Searching Video's for counting, characters, textarea
|
advertisement
|
|