PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 19th, 2013, 10:22 PM
ak4744710 ak4744710 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 21 ak4744710 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 5 m 44 sec
Reputation Power: 0
PHP-General - Can you find my problem links not printing to screen

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.

Code:
<?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();
    }

    ?>

Code:
<?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";
}
?>

Reply With Quote
  #2  
Old February 19th, 2013, 10:41 PM
ak4744710 ak4744710 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 21 ak4744710 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 5 m 44 sec
Reputation Power: 0
solved

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Can you find my problem links not printing to screen

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap