Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

manx

Members
  • Joined

  • Last visited

Reputation Activity

  1. Like
    manx reacted to webdeveloper93 in Need some help with simple PHP script!   
    To be more helpful on the topic of validation and php here is some example functions i built to help get you started. You can throw these in a simple include file
    <?php /** * Checks if a email address is in valid format or not * @[member="param"] string $email * @[member="param"] string $flags * @return bool */ if (!function_exists('is_email')) { function is_email($email, $flags = "") { return (filter_var($email, FILTER_VALIDATE_EMAIL, $flags)) ? true : false; } } /** * Returns true if a valid integer is passed. * @[member="param"] int $int * @[member="param"] string $flags * @return bool */ if (!function_exists('is_int')) { function is_int($int, $flags = "") { return (filter_var($int, FILTER_VALIDATE_INT, $flags)) ? true : false; } } /** * Checks if a IP address is valid or not * @[member="param"] string $ip * @[member="param"] string $flags * @return bool */ if (!function_exists('is_ip')) { function is_ip($ip, $flags = "") { return (filter_var($ip, FILTER_VALIDATE_IP, $flags)) ? true : false; } } /** * Checks to see if a url is valid or not * the url must contain http:// for * this check to return true * @[member="param"] string $url * @[member="param"] string $flags * @return bool */ if (!function_exists('is_url')) { function is_url($url, $flags = "") { return (filter_var($url, FILTER_VALIDATE_URL, $flags) && strpos(strtolower($url), "http://") !== false) ? true : false; } } Then call a function like this
    if(is_url("test") === true) { //Url is valid }else{ //Url is not valid } Another good method to use when validating data is to store the error messages in an array like such
    $error = array();//Error array if(!isset($_POST['name'])) { $error[] = "Please enter your name"; } //SOME ERROR DISPLAYING EXAMPLES //Get first error in the error array if(count($error) > 0) { echo $error[0]; } //Loop through entire array if(count($error) > 0) { foreach($error as $errors): echo $errors."<br />"; endforeach; }

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.