View previous topic :: View next topic |
Author |
Message |
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Mon Jul 18, 2005 7:23 pm Post subject: Need help with basic PHP |
|
|
Okay, I've got a variable, $name, which is the same as $_GET[name]. The thing is that i don't want it to contain more than 30 characters. If the user types more than 30 characters, I want the script to show an error-message. Can anyone give me an example of how to do that? |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Mon Jul 18, 2005 7:50 pm Post subject: |
|
|
www.justfu... Oh wait ;)
if (strlen($name) > 30) {
print "Input too long!";
} |
|
Back to top |
|
 |
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Mon Jul 18, 2005 8:07 pm Post subject: |
|
|
Thanks.
I guess I was to lazy to use Google. |
|
Back to top |
|
 |
mtbiking -
Joined: 18 Mar 2004 Posts: 66
|
Posted: Tue Jul 19, 2005 8:43 pm Post subject: |
|
|
don't tell people to google it when it is php
tell them to check php.net it has alot of info on php and google spits out a load of crap _________________ Check It Out... Nochex Classifieds |
|
Back to top |
|
 |
Anonymoose -
Joined: 09 Sep 2003 Posts: 2192
|
Posted: Tue Jul 19, 2005 9:43 pm Post subject: |
|
|
mtbiking wrote: | don't tell people to google it when it is php
|
Just kind of an in joke you missed out on there - I would normally refer to the PHP docs... |
|
Back to top |
|
 |
mtbiking -
Joined: 18 Mar 2004 Posts: 66
|
Posted: Tue Jul 19, 2005 10:14 pm Post subject: |
|
|
i was going to say that
just f'in php it but i thought i might get banned
and that reminds me the domain is still available
CENSORED.com &
CENSORED.com _________________ Check It Out... Nochex Classifieds |
|
Back to top |
|
 |
|