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
Since the string starts with http://, strpos will return 0, which will evaluate to false.
http://
strpos
0
Change the if statement to:
if(strpos($domain, "http://") !== FALSE){