function checkPOST($args) { // Check empty password if (empty($args['password'])) { return '<div>The password field is empty</div>'; } // Check invalid email if (!Valid::email($args['email']) && $args['noCheckEmail'] == '0') { return '<div>Your email address is invalid.</div><div id="jscompleteEmail">Proceed anyway!</div>'; } // Sanitize email $email = sanitize::email($args['email']); // Install Bludit install($args['password'], $email, $args['language']); return true; }
function checkPOST($args) { global $Language; // Check empty password if (strlen($args['password']) < 6) { return '<div>' . $Language->g('Password must be at least 6 characters long') . '</div>'; } // Check invalid email if (!Valid::email($args['email']) && $args['noCheckEmail'] == '0') { return '<div>' . $Language->g('Your email address is invalid') . '</div><div id="jscompleteEmail">' . $Language->g('Proceed anyway') . '</div>'; } // Sanitize email $email = sanitize::email($args['email']); // Install Bludit install($args['password'], $email, $args['timezone']); return true; }
echo $Security->printTokenCSRF(); ?> "> <input id="name" type="text" name="name" value="<?php echo sanitize::html($name); ?> " placeholder="<?php echo $Language->get('Name'); ?> " class="pure-input-1-2"> <input id="email" type="email" name="email" value="<?php echo sanitize::email($email); ?> " placeholder="<?php echo $Language->get('Email'); ?> " class="pure-input-1-2"> <textarea id="message" rows="6" name="message" placeholder="<?php echo $Language->get('Message'); ?> " class="pure-input-1-2"><?php echo sanitize::html($message); ?> </textarea> </fieldset> <input type="checkbox" name="interested"> <button id="submit" name="submit" type="submit" class="pure-button pure-button-primary"><?php echo $Language->get('Send'); ?> </button> </form>