Toda la web me anda Exelente casi imprime lo que quiero solo que una linea sobra.
y es esta:
**
<b>Warning</b>: Cannot modify header information - headers already sent by (output started at C:\xampp\htdocs\traductor\index.php:50) in <b>C:\xampp\htdocs\traductor\index.php</b> on line <b>47</b><br />
<br />
**
este es el codigo fuente:
<?php
include_once "./includes/obdc_conex.php";
$tabla =$_POST['tabla'];
$tabla2 =$_POST['tabla2'];
$type =$_POST['type'];
if (isset($_POST['submit']))
{
if($tabla<>'Dataespanol123')
{
//Verificar Staff
$certi = ("SELECT Top 1 Type
,TypeID
,ItemID
,ItemName
,ItemDesc
,Reqlevel
,Slot
,Country
FROM OMG_GameWEB.dbo.$tabla
WHERE Type BETWEEN $type
ORDER BY RowID ASC");
$resultd0 = odbc_exec($dbConn,$certi);
while($row1 = odbc_fetch_array ($resultd0))
{
header('Content-type: application/msword');
header('Content-Disposition: inline; filename=documento_de_texto.txt');
$contenido="INSERT INTO OMG_GameWEB.dbo.$tabla2 (Type,TypeID,ItemName,ItemDesc,Reqlevel,Slot,Country) values (".$row1['Type'].",".$row1['TypeID'].",".$row1['ItemName'].",".$row1['ItemDesc'].",".$row1['Reqlevel'].",".$row1['Slot'].",".$row1['Country'].");";
echo $contenido;
}
}
ELSE
{
//Verificar Staff
$certi = ("SELECT Type
,TypeID
,ItemID
,ItemName
,ItemDesc
,Reqlevel
,Slot
,Country
FROM OMG_GameWEB.dbo.$tabla
WHERE Type BETWEEN $type
ORDER BY Id ASC");
$resultd0 = odbc_exec($dbConn,$certi);
while($row1 = odbc_fetch_array ($resultd0))
{
header('Content-type: application/msword');
header('Content-Disposition: inline; filename=documento_de_texto.txt');
$contenido="INSERT INTO OMG_GameWEB.dbo.$tabla2 (Type,TypeID,ItemName,ItemDesc,Reqlevel,Slot,Country) values (".$row1['Type'].",".$row1['TypeID'].",".$row1['ItemName'].",".$row1['ItemDesc'].",".$row1['Reqlevel'].",".$row1['Slot'].",".$row1['Country'].");";
echo $contenido;
}
}
}
?>
<!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" lang="en" xml:lang="en">
<head>
<title>Traductor by Jvc
</title>
<link rel="Shortcut Icon" href="./images/icon.jpeg" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<center>
<form action="<?php
echo $_SERVER['PHP_SELF'];
?>" method="POST">
<table>
<tr><td><select name="tabla" required/>
<option value="">Selecione el Typo de Tabla a Traducir</option>
<option value="Dataespanol123">Importada desde Access</option>
<option value="Original_Lenguaje">Tabla En Español</option>
<option value="Lenguaje_sin_Especiales_Original">Tabla Que reemplaza Caracteres</option>
<option value="Lenguaje_Idioma">Tabla traducida</option>
<tr><td><select name="tabla2" required/>
<option value="">Para Insertar en?</option>
<option value="Original_Lenguaje">Tabla En Español</option>
<option value="Lenguaje_sin_Especiales_Original">Tabla Que reemplaza Caracteres</option>
<option value="Lenguaje_Idioma">Tabla traducida</option>
<tr><td><select name="type" required/>
<option value="">ver entre Types</option>
<option value="1 AND 30"> 1 al 30</option>
<option value="31 AND 60">31 al 60</option>
<option value="61 AND 90">61 al 90</option>
<option value="91 AND 120">91 al 120</option>
<option value="121 AND 150">121 al 150</option>
<option value="151 AND 200">151 al 200</option>
<option value="1 AND 200">TODO</option>
</table>
<p><input type="submit" value=" Enviar " name="submit" /></p>
</form>
</center>
</body>
</html>
De hecho genera la hoja de txt pero la linea esa que tiene partes html es molesta.
puede hacerse con un select cualquiera de 2 o tres el detalle es solo quitar eliminar ese error. Que arroja al descargar el txt.