sama Posted May 10, 2010 Share Posted May 10, 2010 Hello forum I have this problem, & I face it a lot I have this template: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Remote Networking Lab</title> <link href="../css/style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- .style7 { font-size: 14px; color: #000000; } .style8 {font-size: 16px} .style9 { font-size: 18px; color: #0000FF; font-weight: bold; } .style10 { font-size: 18px; color: #0000CC; } --> </style> </head> <body> <center> <!--main-div--> <div id="main"> <!--logo-div--> <div id="logo"> <div id="commonblockone"></div> <div id="commonblocktwo"> <div id="link2"> <ul> <li><a href="Login.php">Home </a></li> <li><a href="index7.htm">Blog</a></li> <li><a href="../Experiments/Experiments.html">Experiments</a></li> <li><a href="../Tools/Tools.html">Tools</a></li> <li><a href="index.php">Forum</a></li> <li><a href="subpage.html">Chat</a></li> <li><a href="../Email/contact.php">Contact Us</a></li> </ul> </div> </div> </div> <!--logo-div-end--> <!--header-div--> <div id="header"> <div style="float:left;border:0px red solid"><img src="../images/purestock_1574r-02037a.jpg" /></div> <div style="float:left;width:px;padding-left:50px;"> <div style="height:32px"></div> <div align="center"> <img src="../images/smsm5.png" alt="" width="500" height="180" /></div> <div></div> </div> </div> /* I insert the code HERE*/ <!--footer-div--> <p> </p> <div style="width:981px; background-color:#FFFFCC;"> <div id="footer"> <div><font class="footertext" >Copyright © 2010<a href="#" class="footertext2"> </a><a href="#" class="footertext2"></a></font> </div> </div> </div> <!--footer-div-end--> </div> <!--main-div-end--> </center> </body> </html> when I want to put something inside it, like this one: <?php session_start(); if ($_SESSION['auth']=="yes") { echo " For the User : {$_SESSION[user]} <br> Your Reservation time start in : {$_SESSION['Time'] }"; } ?> nothing appear... where is the problem? please help me....I need help Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/ Share on other sites More sharing options...
ignace Posted May 10, 2010 Share Posted May 10, 2010 Try if ($_SESSION['auth'] == 'yes') { echo " For the User : {$_SESSION[user]} <br> Your Reservation time start in : {$_SESSION['Time'] }"; } else { echo ' Not defined'; } What does that output? Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055870 Share on other sites More sharing options...
Adam Posted May 10, 2010 Share Posted May 10, 2010 Could you elaborate on "nothing appear"? i.e. Is it a blank page? Does the PHP not display (or not display as expected)?, etc. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055872 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 hello thanks for your quick replies. when I run the code without inserting it in the middle of the template, like this only: <?php session_start(); if ($_SESSION['auth']=="yes") { echo " For the User : {$_SESSION[user]} <br> Your Reservation time start in : {$_SESSION['Time'] }"; } ?> everything works good...the output is (for example): For the User : ewqr Your Reservation time start in : 2010-03-10 14:00:00 but when I put the code between the header div & the footer div, only the template appears!! nothing printed about the user & no echo is executed.. where is the mistake?? Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055899 Share on other sites More sharing options...
Adam Posted May 10, 2010 Share Posted May 10, 2010 Is it visible within the source? Perhaps the styles in your template are masking it.. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055904 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 Hello MrAdam what you mean by "visible"? what can I do to fix the problem. I face it in another script. help? Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055918 Share on other sites More sharing options...
Adam Posted May 10, 2010 Share Posted May 10, 2010 As in when you view the HTML source, is the PHP output there? By masked I meant defective CSS forcing the header or footer to literally cover up - mask - the output. Did you even try ignace's suggestion? Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055921 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 hello MrAdam you are right. I replace the php code with the following: <?php echo "Hello"; ?> and nothing appears. only the template and a space between the header & the footer. what can I do to solve this problem?? Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055958 Share on other sites More sharing options...
ignace Posted May 10, 2010 Share Posted May 10, 2010 Then it is most presumably that PHP isn't installed or an incorrect extension (.html instead of .php) as PHP then is recognized as HTML due to the < and > and therefor hidden. Right click on your web-page and select View Source and go through it you'll find: <?php .. ?> Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055965 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 hello iganc everything is OK. PHP is installed & the extention is (.php) I run many scripts & everything is good, but when I put the php code inside the html code, nothing appears, just the html & a space indicating that something is their but invisible. help me. I think the problem is simple. thanks a lot Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055972 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 ignace I saw the page source, their is a Hello word !!! what can I do to solve the problem?? Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055976 Share on other sites More sharing options...
hcdarkmage Posted May 10, 2010 Share Posted May 10, 2010 It may be that you have the text color the same as your body color. You may want to check that out. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055979 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 It may be that you have the text color the same as your body color. You may want to check that out. Hello hcdarkmage..thanks for the replay.. I feel that. how can I change the color of the text, the radio button caption and so on?? because in another script, the radio buttons appear but the text (the radio button caption) beside it don't. :-\ Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055989 Share on other sites More sharing options...
hcdarkmage Posted May 10, 2010 Share Posted May 10, 2010 Check your CSS file. I see that you are pulling one. All you have to do is see if there is a body { color: #000000; } or something similar in the CSS file. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1055992 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 Check your CSS file. I see that you are pulling one. All you have to do is see if there is a body { color: #000000; } or something similar in the CSS file. hello hcdarkmage yes there is... I change it to another value but nothing happened ... Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056000 Share on other sites More sharing options...
hcdarkmage Posted May 10, 2010 Share Posted May 10, 2010 One more suggestion, I guess. In the area that you want to put your code try putting in something like <p>This is test text to see if it shows.</p> See if anything shows up that way. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056003 Share on other sites More sharing options...
ignace Posted May 10, 2010 Share Posted May 10, 2010 Check your CSS file. I see that you are pulling one. All you have to do is see if there is a body { color: #000000; } or something similar in the CSS file. That will take a long time! Do you use Firefox? And do you have Firebug installed? If not go to Extra > Add-Ons search for Firebug and install it and restart Firefox. Once Firefox starts again and opens your previous tabs press F12 on your page, click on the arrow on the left-top (next to the bug) move over your page with your mouse (blue borders will appear) to where your text should come, the styles rules for that area appear in the box on the right, click and scroll through it, double-click on a value to change it. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056006 Share on other sites More sharing options...
hcdarkmage Posted May 10, 2010 Share Posted May 10, 2010 ignace is right. I keep forgetting about firebug, . Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056010 Share on other sites More sharing options...
sama Posted May 10, 2010 Author Share Posted May 10, 2010 Dear hcdarkmage + ignace Thank you soooooooo much... everything is OK now... thanks for your time & your helpful spirit.. sama Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056028 Share on other sites More sharing options...
ignace Posted May 10, 2010 Share Posted May 10, 2010 Dear hcdarkmage + ignace Thank you soooooooo much... everything is OK now... thanks for your time & your helpful spirit.. sama Don't forget MrAdam Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056049 Share on other sites More sharing options...
Adam Posted May 11, 2010 Share Posted May 11, 2010 Dear hcdarkmage + ignace Thank you soooooooo much... everything is OK now... thanks for your time & your helpful spirit.. sama Don't forget MrAdam Ha, thank you ignace. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056259 Share on other sites More sharing options...
ignace Posted May 11, 2010 Share Posted May 11, 2010 Dear hcdarkmage + ignace Thank you soooooooo much... everything is OK now... thanks for your time & your helpful spirit.. sama Don't forget MrAdam Ha, thank you ignace. Credit is due where credit is due, we all have helped so if she's to name names she might as well mention everyone. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056312 Share on other sites More sharing options...
sama Posted May 11, 2010 Author Share Posted May 11, 2010 sorry Thank you MrAdam But still I don't know how to save the effects that I change in firebug. whenever I run the script, I should change the color value ??!! Thank you all for your support.. sorry for being late.. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056354 Share on other sites More sharing options...
Adam Posted May 11, 2010 Share Posted May 11, 2010 Firebug is only ever temporary. ignace was just suggesting to use it as a way to view the styles applied to the output text (i.e. to check if the colour is white on white background). If you provide a screen shot with the text selected with the 'inspect element' tool we should be able to tell you what's wrong; or even better a URL to a version available on the internet. Quote Link to comment https://forums.phpfreaks.com/topic/201266-redundant-problem/#findComment-1056357 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.