Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums

Go Back   Code Forums > Application and Web Development > PHP

Reply
 
LinkBack Thread Tools Display Modes
Old 10-18-2003, 01:44 PM   #1 (permalink)
jimmyoctane
Registered User
 
jimmyoctane's Avatar
 
Join Date: Sep 2003
Location: California
Posts: 26
jimmyoctane is on a distinguished road
Send a message via AIM to jimmyoctane
How can I count characters in a text field?

I am tring to determine the length of data in a form field.

Can someone give me a nudge in the right direction?


Thanks
Jimmy "Texas Chili" Octane
jimmyoctane is offline   Reply With Quote
Old 10-18-2003, 02:04 PM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,487
sde is on a distinguished road
mmmm ... chili ..

are you talking about after being submitted or before? you can only get info on 'form fields' with javascript .. but after you submit the form, then you are dealing with variables.

some example code would be cool .. but if my "assum"tions are correct, you want to determine the length of a string.
PHP Code:
<?
$str 
'abcdef';
echo 
strlen($str); // 6

$str ' ab cd ';
echo 
strlen($str); // 7
?>
http://www.php.net/manual/en/function.strlen.php

is that what you were looking for?
__________________
Mike
sde is offline   Reply With Quote
Old 10-18-2003, 03:38 PM   #3 (permalink)
jimmyoctane
Registered User
 
jimmyoctane's Avatar
 
Join Date: Sep 2003
Location: California
Posts: 26
jimmyoctane is on a distinguished road
Send a message via AIM to jimmyoctane
as always that is just what I was looking for

How can I be the man when you are the MAN??
Thanks
jimmyoctane is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding infinite text fields Mkers12 Java 8 08-17-2004 12:13 PM
[MySQL] blob vs text redhead PHP 2 03-29-2004 11:15 PM


All times are GMT -8. The time now is 02:41 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting