PHP - Moved: How To Allow Only Numbers Letters And (.,/) In Html Input
This topic has been moved to JavaScript Help.
http://www.phpfreaks.com/forums/index.php?topic=318062.0 Similar TutorialsThis topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=333172.0 Hi Guys
I have a regex conundrum that at first I thought would be very easy but then appears to be quite hard :/
I want to match a string with a regex where the regex can only pass if it contains letters and numbers (nothing else) and it has to contain at least one of each.
I've been trying out lookaheads but just can't get it right.
Any help is appreciated.
Drongo
I need users to input ONLY numbers or letters with numbers. How can i go about fixing that. Thank you. Hey. I been using a function to check if a string contains only letters which is: ctype_alpha But i would like to change it to allow numbers 0 to 9 and the letters is there a function to do that in PHP i can't find it. Maybe it's a Regex question, but I'm wondering how one would go about generating alphanumeric passwords that do not contain either the letters 'oh' or 'el', or the numbers 1 (one) or 0 (zero)? In other words, the p/w can contain any letters of the alphabet - apart from 'oh' and 'el' - and any digits from 2 to 9 inclusive. The p/w length is not critical - let's say 8 characters. Thanks in advance for your help. I'm certain this has been done a hundred times before, but I have been unable to find any information on an efficient way of doing this: I'm creating a membership system, and the password for new users needs to contains both numbers and letters. How do I go about checking this? The key is not that it contains only numbers and letters, but that it contains both. The password cannot be all letters or all numbers. Know what I mean? Cheers guys and gals. Can I somehow mix letters with numbers to create an array with range()? e.g. I want my array for postcode ranges such as array('AB1','AB2', 'AB3', 'AB4', 'AB5', 'Ab6', 'AB7', 'AB8', 'IV5', 'IV6', 'IV7', 'IV8', 'IV9', 'IV10'); I know I can do range(1,8); but was wondering if there was something along the lines of range("AB1", "AB8"); This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=331361.0 This topic has been moved to PHP Regex. http://www.phpfreaks.com/forums/index.php?topic=322151.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=353188.0 My employer asked if I could change an existing contact form on their website to allow clients to enter their Social Security Number along with the normal contact information if the client decide to do so, instead of going through the motion of physically send in the form via snail mail, fax, or in person (like it is currently handled). But since this piece of information is of such delicate nature, I wonder how I should approach this from both a legal standpoint and from a programming standpoint. The form currently sends the information entered by the user to an inbox with mail(), so my initial thought was to somehow encrypt the information, limiting the risk of someone getting a hold of this information once the use user clicks "Send". But is full blown SSL really necessary for this? Are there easier options? And what should I think about before enabling this? This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=330084.0 This topic has been moved to Third Party PHP Scripts. http://www.phpfreaks.com/forums/index.php?topic=306489.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=317004.0 This topic has been moved to Miscellaneous. http://www.phpfreaks.com/forums/index.php?topic=344655.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=342456.0 Hi, I need to sort variables in groups of up to 15 and put it in an array. For example: $exstract['center_tabOpBody_0'] =5 $exstract['center_tabOpBody_1'] =6 $exstract['center_tabOpBody_2'] =8 $exstract['center_tabOpBody_3'] =1 Should yield: ARRAY( = center_tabOpBody_1,center_tabOpBody_2,center_tabOpBody_3 // <-----15 [1] = center_tabOpBody_0 //<----5 ) Is there some simple function do do the "efficiency" sort? Thanks, Vadim This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=357414.0 This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=319994.0 I could use some help converting this HTML... Code: [Select] <textarea id="question1" name="answerArray[1]" cols="60" rows="2"><?php if (isset($answerArray[1])){echo htmlentities($answerArray[1], ENT_QUOTES);}? ></textarea> ...into PHP. This is what I have so far, but I'm getting messed up with the Sticky Form part... Code: [Select] echo '<textarea id="question' . $questionNo . '" name="qaArray[' . $questionID . ']" cols="60" rows="2"> ' . '<?php if (isset($qaArray[' . $questionID . '])){echo htmlentities($qaArray[' . $questionID . '], ENT_QUOTES);} ?></textarea>'; Thanks, Debbie |