Changeset 550 for trunk/docs/examples/contact_form/contact.php
- Timestamp:
- Nov 24, 2015 5:38:54 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/examples/contact_form/contact.php
r479 r550 4 4 * For details visit the project site: <http://trac.strangecode.com/codebase/> 5 5 * Copyright 2001-2012 Strangecode, LLC 6 * 6 * 7 7 * This file is part of The Strangecode Codebase. 8 8 * … … 11 11 * Free Software Foundation, either version 3 of the License, or (at your option) 12 12 * any later version. 13 * 13 * 14 14 * The Strangecode Codebase is distributed in the hope that it will be useful, but 15 15 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 16 16 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 17 17 * details. 18 * 18 * 19 19 * You should have received a copy of the GNU General Public License along with 20 20 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>. … … 59 59 $email = new Email(array( 60 60 'to' => $email_to, 61 'from' => sprintf(' %s <%s>', getFormData('name'), getFormData('email')),61 'from' => sprintf('"%s" <%s>', addcslashes(getFormData('name'), '"'), getFormData('email')), 62 62 'subject' => 'Contact form email', 63 63 )); … … 110 110 $fv->notEmpty('name', sprintf(_("%s cannot be blank."), _("Name"))); 111 111 $fv->stringLength('name', 0, 255, sprintf(_("%s must be %d-to-%d characters in length."), _("Name"), 0, 255)); 112 112 113 113 $fv->notEmpty('email', sprintf(_("%s cannot be blank."), _("Email"))); 114 114 $fv->stringLength('email', 0, 255, sprintf(_("%s must be %d-to-%d characters in length."), _("Email"), 0, 255)); 115 115 $fv->validateEmail('email'); 116 116 117 117 $fv->notEmpty('message', sprintf(_("%s cannot be blank."), _("Message"))); 118 118 $fv->stringLength('message', 0, 32000, sprintf(_("%s must be %d-to-%d characters in length."), _("Message"), 0, 32000));
Note: See TracChangeset
for help on using the changeset viewer.