Forum Home
|
Marketplace
|
Articles
|
Blogs
|
Interviews
|
Tools
REGISTER
|
SEARCH
|
MEMBERS
|
F.A.Q.
Register Here
Forum Rules
Webmaster-Talk.com
>
Coding Talk
>
PHP Forum
>
max characters variable
Link Back
Thread Tools
max characters variable
09-26-2007, 04:56 AM
#
1
(
permalink
)
max characters variable
koolaid
Average Talker
Posts: 20
Talkupation:
Hello,
How can i add a max character limit to a variable?
So if the var the user inputs is too long, it stops the procedure. else, continue.
Thanks in advance
When You
Register
, These Ads Go Away!
09-26-2007, 05:13 AM
#
2
(
permalink
)
Re: max characters variable
tripy
Fetchez la vache!
Latest Blog Post:
Python is great, but why do python frameworks suck...
Posts: 1,855
Name: Thierry
Location: In the void
Talkupation:
PHP Code:
if(
strlen
(
$var
)>
$limit
){
echo(
'naughty boy!'
);
exit();
}
else{
....
}
Or in html, on the <input> tags, you have a "maxlength" attribute that specify the maximum number of characters the user can type.
__________________
Listen to the ducky: "This is awesome
!!!
"
« Reply to
max characters variable
Previous Thread
|
Next Thread
Webmaster-Talk.com
>
Coding Talk
>
PHP Forum
>
max characters variable
Thread Tools
Show Printable Version
Email this Page
Posting Rules
You
may not
post new threads
You
may not
post replies
You
may not
post attachments
You
may not
edit your posts
vB code
is
On
Smilies
are
On
[IMG]
code is
On
HTML code is
Off
Trackbacks
are
Off
Pingbacks
are
Off
Refbacks
are
Off
Webmaster Resources Marketplace:
Software Development Company
|
Webhosting.UK.com
Web Templates
|
Text Link Brokers
|
Stock Photos
Feeds:
RSS
JS
XML
Feeds for this forum:
RSS
JS
XML
Mark Forums Read
-
View Forum Leaders
-
Contact Us
-
Webmaster Forum
-
Advertise
-
Archive
-
Privacy Statement
-
Top
Page generated in
0.13082
seconds with
13
queries