RE: [PHP] Technique
| From: | Michael Richardson | Date: | Tue, 01 Aug 2000 16:48:42 +0000 |
| Subject: | RE: [PHP] Technique | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-9475@lists.php.net to get a copy of this message | ||
Mr. Coggeshall:
I stumbled across a javascript code a while back that allows you to place an
"other" in your pulldown menu, when the other is selected, a text box pops
up that allows a user to enter a custom choice, and sends its value in place
of the html selections(as well as several other neat little menu functions).
I have attached the entire page in html format for you to look at.
Maybe this will generate some ideas for you.
Michael Richardson
-----Original Message-----
From: John Coggeshall [mailto:someone@internetaddress.com]
Sent: Monday, July 31, 2000 4:54 AM
To: php-general@lists.php.net
Subject: [PHP] Technique
Hey all -- I've got a question more of technique than hard knowledge. This
is what I've got..
I've got a form that has all types of fields....what I would like to do is
have a corresponding checkbox for all of those fields. The purpose is, when
a field that is listed doesn't completely cover what the user wants, they
can click the checkbox. When a checkbox is clicked for that field, I want
the field that they selected displayed along with a "See Additional Notes".
I'm having a little trouble figuring out a "clean" way of accomplishing
this -- any suggestions?
John
-----Original Message-----
From: Ori Staub [mailto:ori@*NO-SPAM*chikki.net]
Sent: Monday, July 31, 2000 7:29 PM
To: php-general@lists.php.net
Subject: [PHP] Regular expressions
I need help with regular expressions.
I need to find the occurrence of characters in a string, however, for
simplicity, I would like to list them by "what is allowed".
I couldn't get it to work using eregi(), so i devised this little function,
but there must be an easier way! - please help
$legal_char_class = "[a-zA-Z0-9\.]";
$length = strlen($name);
for ($i=0; $i <= $length - 1 ; $i++){
$text_pos = $length - $i;
// break up string into array and test each character
$name_array[$i] = substr($domain_name, -$text_pos,1);
if (!ereg($legal_char_class,$name_array[$i])){
$error = true;
}
}// end for loop
--
Ori Staub
ori@_NO_SPAM_chikki.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net