1. you just include the footer file in the bottom of each page - it is not seperate as in a frame - it is just the bottom part of every page...
2. 4 is the minimum - you can add as manyas you want, but more pages do not mean more marks.
I explain for the benefit of all. You should not have to refresh or submit twice. On one page you have an if and an else, dividing the page into "two pages" - or more. Here below I have 3 "pages" in one
Language: PHP
if($update==';yes';)){
// update student details
mysql_query
// echo the update
echo "$sno updated: $init $sname $ course etc";
//and provide a link to go back to the student listing
<a href=';same_page.php';)Update another</a> //or Go back
}
elseif(delete==';yes';) {
//delete the student
mysql_query
// echo the delete
echo "$sno deleted: $init $sname $ course etc";
//and provide a link to go back to the student listing
<a href=';same_page.php';)Delete another</a> // or Go back
}
else
{
//show list of students
mysql_query
//and in the db loop options to delete or update a student
echo "$sno $init $sname <a href=';same_page.php?delete=yes&sno=$sno>Delete<a> <a href=';same_page.php?update=yes&sno=$sno>Update<a>";
}
So on first open of the page the list of students is shown. Then you delete a student, and the same page is called. The choice now is yours - you can provide links to go back to the listings of students as here above - alternatively you can echo the list of students within the delete/update brackets. If you do that, it is best to use a function
Language: PHP
if($update==';yes';)){
// update student details
mysql_query
//echo the update
echo "$sno updated: $init $sname $ course etc";
//list students
function list_students();
}
elseif(delete==';yes';) {
//delete the student
mysql_query
// echo the delete
echo "$sno deleted: $init $sname $ course etc";
//list students
function list_students();
}
else
{
// list students
function list_students();
// the function containing, within the db loop <a href=';same_page.php?delete=yes&sno=$sno>Delete<a> <a href=';same_page.php?update=yes&sno=$sno>Update<a> as here above
}