pesquisei em mil sites sobre o erro abaixo, fiz tudo o que eles pediam, porém, nada ajudou, por isso estou apelando para o forum. Sera que alguém podia me dar a luz no fim do tunel?
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at G:\Opc2\clientes\faz_consulta\faz_consulta.php:1) in G:\Opc2\clientes\faz_consulta\faz_consulta.php on line 2
Eis o código.
<?php
session_start();
include("funcoes.php");
require_once "conecta_sgv.php";
$user = $_SESSION['id'];
$men = mysql_query("SELECT * FROM usuarios WHERE usuario = '$user'");
$emp = $_POST['Empresas'];
$uni = $_POST['Unidades'];
$con = $_POST['Contatos'];
require_once("conecta.php");
$sql = "SELECT * from empresas WHERE id = '$emp'";
$qr=mysql_query($sql);
$aux=mysql_fetch_object($qr);
$sql2="SELECT * from unidades WHERE id = '$uni'";
$qr2=mysql_query($sql2);
$aux2=mysql_fetch_object($qr2);
$sql3="SELECT * from contatos WHERE id = '$con'";
$qr3=mysql_query($sql3);
$aux3=mysql_fetch_object($qr3);
$sql4="SELECT * from hardware WHERE unidade_ID = '$uni' ORDER BY fornecedora";
$qr4=mysql_query($sql4);
$sql5="SELECT * from software WHERE unidade_ID = '$uni' ORDER BY nome";
$qr5=mysql_query($sql5);
$sql6="SELECT id from software WHERE unidade_ID = '$uni' ORDER BY nome";
$qr6=mysql_query($sql6);
$x = mysql_fetch_object($qr6);
$soft_id = $x->id;
$sql7 = "SELECT * from acessorios_pdma WHERE unidade_id = '$uni'";
$qr7 = mysql_query($sql7);
$sql8="SELECT id from hardware WHERE unidade_ID = '$uni'";
$qr8=mysql_query($sql8) or die (mysql_error());
$z = mysql_fetch_object($qr8);
$hard_id = $z->id;
mysql_close();
?>
<HTML>
<HEAD>
<TITLE>sgv</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8">
<style type="text/css">
<!--
body {
background-color: #0052A5;
}
#apDiv1 {
position:absolute;
width:341px;
height:21px;
z-index:1;
left: 61px;
top: 4px;
}
#apDiv2 {
position:absolute;
width:735px;
height:23px;
z-index:2;
left: 63px;
top: 32px;
}
#apDiv3 {
position:absolute;
width:295px;
height:13px;
z-index:3;
left: 127px;
top: 70px;
}
#apDiv4 {
position:absolute;
width:298px;
height:14px;
z-index:4;
left: 507px;
top: 69px;
}
#apDiv5 {
position:absolute;
width:351px;
height:235px;
z-index:5;
left: 70px;
top: 90px;
}
#apDiv6 {
position:absolute;
width:352px;
height:237px;
z-index:6;
left: 452px;
top: 89px;
}
#apDiv7 {
position:absolute;
width:735px;
height:170px;
z-index:7;
left: 70px;
top: 367px;
}
-->
</style></HEAD>
<BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<!-- ImageReady Slices (sgv.psd) -->
<center><IMG SRC="images/sgv.gif" WIDTH=767 HEIGHT=570 BORDER=0 ALT=""></center>
<div id="apDiv5"></div>
<div id="apDiv6"></div>
<div id="apDiv7"></div>
<div id="apDiv1"><? echo "<font size=2><b>Olá $user, em que posso lhe ser útil hoje?</b></font>"; ?></div>
<div id="apDiv2"><? ver_per($men);?></div>
<div id="apDiv3"><? echo "$aux->Empresas"; ?></div>
<div id="apDiv4"></div>
<!-- End ImageReady Slices -->
</BODY>
</HTML>
Pergunta
cmdmss
Caros colegas,
pesquisei em mil sites sobre o erro abaixo, fiz tudo o que eles pediam, porém, nada ajudou, por isso estou apelando para o forum. Sera que alguém podia me dar a luz no fim do tunel?
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at G:\Opc2\clientes\faz_consulta\faz_consulta.php:1) in G:\Opc2\clientes\faz_consulta\faz_consulta.php on line 2
Eis o código.
<?php session_start(); include("funcoes.php"); require_once "conecta_sgv.php"; $user = $_SESSION['id']; $men = mysql_query("SELECT * FROM usuarios WHERE usuario = '$user'"); $emp = $_POST['Empresas']; $uni = $_POST['Unidades']; $con = $_POST['Contatos']; require_once("conecta.php"); $sql = "SELECT * from empresas WHERE id = '$emp'"; $qr=mysql_query($sql); $aux=mysql_fetch_object($qr); $sql2="SELECT * from unidades WHERE id = '$uni'"; $qr2=mysql_query($sql2); $aux2=mysql_fetch_object($qr2); $sql3="SELECT * from contatos WHERE id = '$con'"; $qr3=mysql_query($sql3); $aux3=mysql_fetch_object($qr3); $sql4="SELECT * from hardware WHERE unidade_ID = '$uni' ORDER BY fornecedora"; $qr4=mysql_query($sql4); $sql5="SELECT * from software WHERE unidade_ID = '$uni' ORDER BY nome"; $qr5=mysql_query($sql5); $sql6="SELECT id from software WHERE unidade_ID = '$uni' ORDER BY nome"; $qr6=mysql_query($sql6); $x = mysql_fetch_object($qr6); $soft_id = $x->id; $sql7 = "SELECT * from acessorios_pdma WHERE unidade_id = '$uni'"; $qr7 = mysql_query($sql7); $sql8="SELECT id from hardware WHERE unidade_ID = '$uni'"; $qr8=mysql_query($sql8) or die (mysql_error()); $z = mysql_fetch_object($qr8); $hard_id = $z->id; mysql_close(); ?> <HTML> <HEAD> <TITLE>sgv</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"> <style type="text/css"> <!-- body { background-color: #0052A5; } #apDiv1 { position:absolute; width:341px; height:21px; z-index:1; left: 61px; top: 4px; } #apDiv2 { position:absolute; width:735px; height:23px; z-index:2; left: 63px; top: 32px; } #apDiv3 { position:absolute; width:295px; height:13px; z-index:3; left: 127px; top: 70px; } #apDiv4 { position:absolute; width:298px; height:14px; z-index:4; left: 507px; top: 69px; } #apDiv5 { position:absolute; width:351px; height:235px; z-index:5; left: 70px; top: 90px; } #apDiv6 { position:absolute; width:352px; height:237px; z-index:6; left: 452px; top: 89px; } #apDiv7 { position:absolute; width:735px; height:170px; z-index:7; left: 70px; top: 367px; } --> </style></HEAD> <BODY LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0> <!-- ImageReady Slices (sgv.psd) --> <center><IMG SRC="images/sgv.gif" WIDTH=767 HEIGHT=570 BORDER=0 ALT=""></center> <div id="apDiv5"></div> <div id="apDiv6"></div> <div id="apDiv7"></div> <div id="apDiv1"><? echo "<font size=2><b>Olá $user, em que posso lhe ser útil hoje?</b></font>"; ?></div> <div id="apDiv2"><? ver_per($men);?></div> <div id="apDiv3"><? echo "$aux->Empresas"; ?></div> <div id="apDiv4"></div> <!-- End ImageReady Slices --> </BODY> </HTML>Link para o comentário
Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.