Código php:
Ver original
<?php require ('fpdf153/fpdf.php'); include('connect.php'); include('login.php'); include('saludo.php'); if($loginCorrecto) { //recibimos variables $recibido=$_POST['recibido']; $afiliado=$_POST['afiliado']; $nit=$_POST['nit']; $ciudad=$_POST['ciudad']; $dia=$_POST['dia']; $mes=$_POST['mes']; $ano=$_POST['ano']; $valorletras=$_POST['valor_letras']; $valor=$_POST['valor_pesos']; $concepto=$_POST['concepto']; $tarjeta=$_POST['tarjeta']; $tarjeta_numero=$_POST['tarjeta_numero']; $cheque=$_POST['cheque']; $banco_cheque=$_POST['banco_cheque']; $banco_ciudad=$_POST['banco_ciudad']; $debito=$_POST['debito']; $efectivo=$_POST['efectivo']; //validamos efectivo if($efectivo){ $efectivo='X'; } else { } //calculamos el saldo del credito $saldo=$debito-$valor; //separamos en miles //generamos el pdf $pdf=new FPDF('P','cm','letter'); $pdf->AddPage(); $pdf->SetFont('Times','',8); $pdf->SetY(5.3); $pdf->SetX(2.2); $pdf->Cell(0,0,$recibido); $pdf->SetY(4.6); $pdf->SetX(14.8); $pdf->Cell(0,0,$nit); $pdf->SetY(4.6); $pdf->SetX(19.9); $pdf->Cell(0,0,$ciudad); $pdf->SetY(5.7); $pdf->SetX(17); $pdf->Cell(0,0,$afiliado); $pdf->SetY(5.6); $pdf->SetX(19.4); $pdf->Cell(0,0,$ano); $pdf->SetY(5.6); $pdf->SetX(20.4); $pdf->Cell(0,0,$mes); $pdf->SetY(5.6); $pdf->SetX(21.5); $pdf->Cell(0,0,$dia); $pdf->SetY(7.2); $pdf->SetX(4.5); $pdf->Cell(0,0,$valorletras); $pdf->SetY(7.9); $pdf->SetX(15.5); $pdf->Cell(0,0,$valormil); $pdf->SetY(8.4); $pdf->SetX(5.5); $pdf->Cell(0,0,$concepto); $pdf->SetY(10.5); $pdf->SetX(5.8); $pdf->Cell(0,0,$tarjeta); $pdf->SetY(10.5); $pdf->SetX(11.5); $pdf->Cell(0,0,$tarjeta_numero); $pdf->SetY(11.4); $pdf->SetX(4.2); $pdf->Cell(0,0,$cheque); $pdf->SetY(11.3); $pdf->SetX(21.5); $pdf->Cell(0,0,$efectivo); $pdf->SetY(12.2); $pdf->SetX(3.5); $pdf->Cell(0,0,$banco_cheque); $pdf->SetY(12.2); $pdf->SetX(12.6); $pdf->Cell(0,0,$banco_ciudad); $pdf->SetY(13.4); $pdf->SetX(5.4); $pdf->Cell(0,0,$debitomil); $pdf->SetY(13.4); $pdf->SetX(7.7); $pdf->Cell(0,0,$valormil); $pdf->SetY(13.4); $pdf->SetX(10.2); $pdf->Cell(0,0,$saldomil); $pdf->Output('recibo ','I'); } elseif ($nivelUsuarioL=='2') { ?> <SCRIPT LANGUAGE="javascript"> location.href = "http://www.everestltda.com/extract/menu_user.php"; </SCRIPT> <? } { echo "Bienvenido visitante, el sistema no te ha reconocido"; ?> <SCRIPT LANGUAGE="javascript"> location.href = "http://www.everestltda.com/extract/ingreso.php"; </SCRIPT> <?php } ?>
pero lo corro y me da este error
Cita:
Notice: Undefined index: id in /home/content/c/e/j/cejarcon/html/everest/extract/login.php on line 21
Notice: Undefined index: id in /home/content/c/e/j/cejarcon/html/everest/extract/login.php on line 21
buenas noches Cesar Augusto Jaramillo
Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/e/j/cejarcon/html/everest/extract/login.php:21) in /home/content/c/e/j/cejarcon/html/everest/extract/fpdf153/fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file
Notice: Undefined index: id in /home/content/c/e/j/cejarcon/html/everest/extract/login.php on line 21
Notice: Undefined index: id in /home/content/c/e/j/cejarcon/html/everest/extract/login.php on line 21
buenas noches Cesar Augusto Jaramillo
Warning: Cannot modify header information - headers already sent by (output started at /home/content/c/e/j/cejarcon/html/everest/extract/login.php:21) in /home/content/c/e/j/cejarcon/html/everest/extract/fpdf153/fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file