require 'db.php'; // print_r($_POST); global $mysqli; extract($_POST); if (isset($name)){ $mysqli->query("INSERT INTO `survey`(`id`, `name`, `age`, `bmi`, `sleeping_hours`, `weight`, `height`, `vf`, `bf`, `gender`, `bp`, `RBSFBS`, `hb`, `cholesterol`, `bun`, `t3`, `t4`, `tsh`, `physicalactivitylevel`, `apetite`, `nausea`, `diarrhea`, `constipation`, `pale`, `lossofappetite`, `insomnia`, `Fatigue`, `Allergy`, `Intolerance`) VALUES (NULL,'$name','$age','$bmi','$sleeping_hours','$weight','$height','$vf','$bf','$gender','$bp','$RBSFBS','$hb','$cholesterol','$bun','$t3','$t4','$tsh','$physicalactivitylevel','$apetite','$nausea','$diarrhea','$constipation','$pale','$lossofappetite','$insomnia','$Fatigue','$Allergy','$Intolerance')"); header('Location:/form/index.php?success'); } ?>