I have a input that you enter a URL, i basically want to write some php that says if the domain containts \"http://\" then leave it be, else if not then add it to the beginn
you forgot to return $domain.
$domain = $_POST["domain"]; if (strpos($domain, "http://") !== false) { return $domain; } else { return "http://" . $domain; }