×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Nov 23, 2017 9:55 AM
Views: 1
Tags: no tags
  1. $website = test_input($_POST["website"]);
  2. if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%=~_|]/i",$website)) {
  3.   $websiteErr = "Invalid URL";
  4. }