Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

can you find error links do not work

$
0
0
Hi can anyone tell me why my codes are not showing up when I load the page my code is below I am guessing they are not printing for some reason if you see my error please rewrite the line the correct way and post so I can fix it thanks very much in advance I have been on it for hours lol.

<?php
include ("includes/header.php");
if ($_POST['submit']!=""){
	if ($_POST['name']!=""){
	session_start();
	$_SESSION['name']=$_POST['name'];
	TopNavigation("php title","hello " .$_SESSION['name']);
}
	else{
		header("Location:includeindex.php");
		exit;
	}
}
else{
    TopNavigation("php title","hello ");
    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();
    }

    ?>

<?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=\"localhost/includeindex.php\">Use a different name | <a href=\"localhost/about.php\">About me\n";
echo "</div>\n";
echo "<p>Welcome. ".$username."!";
}
}
function Footer(){
echo "</body>\n";
echo "</html>\n";
}
?>

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>