Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/142005-solved-echo-issues/
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/142005-solved-echo-issues/#findComment-743558
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.