MySQL #1005 - Can't create table 'startet' (errno: 150)
You need a key on passering.starttid in order to link it as a foreign key.

Like this:

   CREATE TABLE passering (
     avstand INT NOT NULL,
     starttid INT NOT NULL,
     slutttid INT NOT NULL,
     passeringspunkt INT NOT NULL,
     høydeforskjell VARCHAR(25) NULL,
     bilde VARCHAR(25) NOT NULL,
     mellomtid VARCHAR(25) NOT NULL,
     PRIMARY KEY (slutttid, starttid),
     KEY (starttid)
     );