PDA

View Full Version : ICQ number problems.



Cold Steel
Sun 7th May '00, 5:15am
When someone puts something other than their ICQ number (for example, n/a or "don't have one") you get a big ugly broken image.

Take a look here:

http://www.aforums.com/showthread.php?threadid=4865

John
Sun 7th May '00, 6:01am
There's not really much that you can do about that. Tell them to leave the box blank if they do not have one.

John

wandrer
Sun 7th May '00, 6:16am
can a simple check be made when people register (or edit their profile) that would check to see if they put in a number or text. If they put in text, it would reject it.

Should be easy to do.

Mike Sullivan
Sun 7th May '00, 7:42am
I think this should work:

if ( (strlen(strpos($variabletocheck, [0-9]))) and (!strlen(strpos($variabletocheck, [a-zA-z]))) ) {
...{numbers only}...
} //end if

Not sure if strpos accepts regular expressions though. (Hope I didn't mess up those parentheses)

John
Sun 7th May '00, 9:42am
I'll do that in the next version.

Thanks,
John

Mike Sullivan
Sun 7th May '00, 10:52am
John - please test it locally before you release it - I have NO clue if it works at all. (that is if you are referring to my code)

[Edited by Ed Sullivan on 05-07-2000 at 10:27 PM]

John
Sun 7th May '00, 11:19am
Don't worry - I wrote my own code. I don't think that PHP would like ...numbers only... anyway :)

John

Mike Sullivan
Sun 7th May '00, 11:29am
What? Haven't you heard of PHP4.rc1-ED? It contains a function ...{numbers only}... :D