temperature gauge pegs out as soon as i turn my switch on. car want crank? on 2000 Mazda Protege

when i turn the ignition on the temperature gauge goes straight to "H" and the car want fire. it turns over but it acts just like it would if it wasnt getting gas. when it first started you could turn the switch off then back on and it would be fine but only run about 35 to 40 secs then cut off and temp gauge would go to hot. Ive replaced the temperature sensor and also the thermastat. Idk what else to do?

Asked by for the 2000 Mazda Protege
sounds like you have a couple of diff issues seek a proper diag and est