/ Published in: PHP
Some times you need to accept some url as input but users seldom add http:// to it, this code will add http:// to the URL if it’s not there.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$_POST['url'] = 'http://'.$_POST['url']; }