//header - output as a text file header("Content-Type: text/plain"); // mySQL details $username='root'; $password='4Q0Hsigms6'; $database='genotypes'; // get GET options $chr=$_GET['chr']; $start=$_GET['start']; $end=$_GET['end']; $id=$_GET['id']; // check the options if (!$chr){ echo "No chromosome specified!"; return(-1); } //HACKHACKHACK if ($chr == "chrM"){ $chr = "chrMT"; } if (!$start){ $start = 0; } if (!$end){ $end = 100000000000; } // connect to and query the database mysql_connect(localhost,$username,$password); @mysql_select_db($database) or die( "Unable to select database"); if ($id){ $query="SELECT * FROM " . $chr . " WHERE rsID = \"" . $id . "\""; } else { $query="SELECT * FROM " . $chr . " WHERE position >