RE: [PHP] Technique
| From: | Dan | Date: | Tue, 01 Aug 2000 03:13:51 +0000 |
| Subject: | RE: [PHP] Technique | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-9345@lists.php.net to get a copy of this message | ||
I don't quite understand your intent, but you can use an array syntax for
your fields and your checkboxes. So checkbox[itemName] and
inputfield[itemName] would be names for your form elements. You'd access
them in PHP using $checkbox[ "itemName" ] and $inputfield[ "itemName" ]. The
itemName could be a text string or an integer, or you can leave it out and
iterate using a foreach loop.
> -----Original Message-----
> From: John Coggeshall [mailto:someone@internetaddress.com]
> Sent: Monday, July 31, 2000 7: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
>