Hi I can not figure out how to straighten up this error can anyone please rewrite the section I am wrritting wrong and post so I can see what I am doing wrong thanks. The exact error I get is Warning:
Quote
Missing argument 2 for TopNavigation(), called in C:\wamp\www\includeindex.php on line 15 and defined in C:\wamp\www\includes\header.php on line 2
<?php
function TopNavigation($pagetitle, $pageheading, $username=''){
echo "<html>\n";
echo "<head>\n";
echo "<title>".$pagetitle."</title>\n";
echo "<link href=\"../style/style.css\" type=\"text/css\" rel=\"stylesheet\">";
echo "</head>\n";
echo "<body>";
echo "<h1>".$pageheading."</h1>\n";
echo "<hr>\n";
echo "<p class=\"tiny\">" .date("F j. Y")."</p>";
if ($username!=''){
echo "<div align=\"center\">\n";
echo "<a href=\"includeindex.php\">Use a different name</a> | <a href=\"about.php\">About me\n";
echo "</div>\n";
echo "<p>Welcome. ".$username."!";
}
}
function Footer(){
echo "</body>\n";
echo "</html>\n";
}
?>
<?php
include ("includes/header.php");
if ($_POST['submit']!=""){
if ($_POST['name']!=""){
session_start();
$_SESSION['name']=$_POST['name'];
TopNavigation(".$pagetitle".".$pageheading".$_SESSION['name']);
}
else{
header("Location:includeindex.php");
exit;
}
}
else{
TopNavigation(".$pagetitle".".$pageheading");
echo "<div class=\"formtable\">\n";
echo "<br>";
echo "<form action=\"" .$PHP_SELF."\" method=\"post\">\n";
echo "Please enter your name: <input type=\"text\" name=\"name\">\n";
echo "<input type=\"submit\" class=\"btnSubmit\" value=\"Enter\" name=\"submit\">\n";
echo "</form>\n";
echo "<br>";
echo "</div>\n";
Footer();
}
?>