denoteone Posted January 22, 2009 Share Posted January 22, 2009 I am only seeing the echo at the top of the script anyone see what my issues is? <?php echo "<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> <html xmlns='http://www.w3.org/1999/xhtml'> <head>"; include 'connect.php'; if(isset($_COOKIE['ID_my_site'])) { $usersemail = $_COOKIE['ID_my_site']; $pass = $_COOKIE['Key_my_site']; $check = mysql_query("SELECT * FROM users WHERE email = '$username'")or die(mysql_error()); while($info = mysql_fetch_array( $check )) { //if the cookie has the wrong password, they are taken to the login page if ($pass != $info['passwords']) { header("Location: login.php"); } else { ?> <title>What would you like to do today?</title> </head> <body> <div style="float:right;"><a href="logout.php">[x] Logout</a></div> <p>I want to:</p> <a href="NewOp_1.php">Register a New Opportunity</a><br/> <a href="PriceQuote_1.php">Build a Price Quote</a><br/> <a href="#">Submit a technical or pricing question to STRATACACHE</a><br/> </body> </html> <? } } } else { header("Location: index.php"); } ?> Quote Link to comment https://forums.phpfreaks.com/topic/142005-solved-echo-issues/ Share on other sites More sharing options...
DeanWhitehouse Posted January 22, 2009 Share Posted January 22, 2009 Might be your or die statement running, put error_reporting(E_ALL); at the top of the page Quote Link to comment https://forums.phpfreaks.com/topic/142005-solved-echo-issues/#findComment-743557 Share on other sites More sharing options...
flyhoney Posted January 22, 2009 Share Posted January 22, 2009 Add this at the top of your script: error_reporting(E_ALL); ini_set('display_errors', 1); Your code has a few errors in it. Also, you are calling header() after you have already sent data to the browser, so that will always produce an error. Quote Link to comment https://forums.phpfreaks.com/topic/142005-solved-echo-issues/#findComment-743558 Share on other sites More sharing options...
denoteone Posted January 22, 2009 Author Share Posted January 22, 2009 I used the error reporting and fixed to issues and moved the doc info after the }else{ and everything looks pretty good. Thanks for the help I will be using the error reporting issue from here on out. Quote Link to comment https://forums.phpfreaks.com/topic/142005-solved-echo-issues/#findComment-743562 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.