Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/11/2012, 10:09
patorodriguez88
 
Fecha de Ingreso: noviembre-2012
Ubicación: Córdoba
Mensajes: 10
Antigüedad: 11 años, 5 meses
Puntos: 0
Problema con tabla y row

Buenas tardes, tengo el siguiente problema, que seguramente es sensillo pero no logro dar en la tecla, no soy experto, me estoy iniciando en la programacion php, luego de varios años de access y vb. tengo una tabla que baja informacion de mysql, y necesito que tenga un boton que cuando lo presiono abra otra pagina y luego en esa pagina obtener la informacion, ya sea con $_post o $_session.

este es el codigo que prepare:

Espero puedan ayudarme!!!:

<form action='hola.php' method='post' class='login' style='width:890px'>

<?

include_once "conexionmy.php";
session_start();

echo "<caption> Ventas Sin Compras Operador</caption>";

$nombre= $_SESSION['NProv'];
echo print $nombre;

$sql3="SELECT * FROM transaccint WHERE Operador='$nombre' AND Eliminado='0' AND CargaGastos='0' ORDER BY Fecha DESC";

$estructura3= mysql_query($sql3);
/* TITULOS*/
echo "<table cellpadding='5' border='0' align='center' bordercolor='#GGGG' cellspacing='0'> \n";
echo "<tr bgcolor='#EFEEEF'><td width='200'>Fecha</td><td width='200' align='left'>N File</td><td width='200' align='left'>Cliente</td><td width='200' align='right'>Importe</th></tr>";
echo "</table>\n";

/*CUERPO DE LA TABLA*/

echo "<div style='height:310px; width:890px; overflow:scroll; overflow-x:hidden'>";

echo "<table height='10px' cellpadding='0' border='0' align='center' bordercolor='#GGGG' cellspacing='10'> \n";
$nfile="";
while ($row = mysql_fetch_array($estructura3)){
$FechaE= explode("-",$row[3]);
$Fecha= $FechaE[2]."/".$FechaE[1]."/".$FechaE[0];

echo "<tr><td width='200'>$Fecha</td><td width='200' align='left'>$row[0]</td><td width='200' align='left'>$row[4]</td><td width='200' align='right'>$row[5]</td><td><input value='Ver' type='submit' name='$nfile'</td></tr>";
if ($nfile != $row[0]){
$nfile=$row[0];
}else{
}
}

$_SESSION['Nfile']=$nfile;
echo print $nfile;

echo "</form>";
echo "</table></div>\n";

/*SALDO*/
echo "<table>";
$result=mysql_query("SELECT SUM(Debe-Haber) as Total FROM Gastos WHERE Proveedor='$u' AND Eliminado='0'");
setlocale(LC_ALL,'es_AR');

$Total= money_format('%i',$rowresult[Saldo]);
echo "<tr><td></td><td></td><td>Saldo Cuenta:</td><td align='right' style='background:#FFF'>$Total</td></tr>";
echo "</table>\n";
function declarau(){
echo $_POST['id']=$u;
}


?>
</tr>

</form>