A
Anonymous
Guest
try moving this part:
to the top of Data_Form2.php (or whatever your next form page is named.
Code:
if ($submit) {
$conn = mysql_connect("mysql", "TeacherCards", "164333") or die("Cannot
connect to server");
mysql_select_db("Teachercards",$conn) or die("Cannot find database");
$sql = "INSERT INTO Teachers
(School,Email,Name,Subject,College,Motto,Story,Food,Color,Hobby,Place,Animal
,Movie,Song,Book,Comment)
VALUES('$School','$Email','$Name','$Subject','$College','$Motto','$Story','$
Food','$Color','$Hobby','$Place','$Animal','$Movie','$Song','$Book','$Commen
t')";
$result = mysql_query($sql);
}
to the top of Data_Form2.php (or whatever your next form page is named.