i have a form where many people simply forget to put http:// while submitting their site. it doesnt redirect. when i create a link it simply points to local file and doesnt work. what is the solution to this?
You need to use an if/else statement in PHP or even Javascript. heres PHP: if ((!strstr($url,'http://')) && (!strstr($url,'https://'))){ $url = 'http://'.$url; } else { //do nothing? $url = $url; } PHP: