Hola amigos, quisiera pedirles si es posible cambiar este mi codigo el cual existe un link para k el usuario imprima la pagina:
Código php:
Ver original<!-- <a href="javascript:print()">Imprimir<img src="icono_impresora2.gif" width="26" height="23" border="0" alt="Imprimir"></a> -->
este es codigo total:
Código php:
Ver original<!-- <?php
include('conec.php');
conectarse();
if(isset($_SESSION['carro'])) $carro=$_SESSION['carro'];
else $carro=false;
$user=$_SESSION['username'];
?>
<html>
<head>
<title>CONFIRMACION DE ENVIO</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<h1 align="center">Confirmación de Orden de Pedido</h1>
<HR NOSHADE>
<?php
if($carro)
{
?>
<table width="95%" border="0" align="center" cellpadding="2" cellspacing="0" class="prod">
<tr>
<td colspan=3 align="right"><a href="javascript:print()">Imprimir<img src="icono_impresora2.gif" width="26" height="23" border="0" alt="Imprimir"></a></td>
</tr>
</table>
<form action="facturar.php" method="post" id="frm" name="frm">
<table>
<tr bgcolor="red" align="center" height="40" class="tit">
<td colspan=3 align="left">Datos de Destinatario</td>
</tr>
<?php
{
?>
<tr>
<td width="30%">Categoría:</td><td width="70%" align="left"><?php echo $row['categoria'] ?></td>
</tr>
<tr>
<td width="30%">Establecimiento Farmacéutico:</td><td width="70%" align="left"><?php echo $row['establecimiento'] ?></td>
</tr>
<?php
}
?>
</table>
<p>
<table width="95%" border="0" cellspacing="2" cellpadding="2" align="center">
<tr bgcolor="red" align="center"class="tit">
<td width="8%">Código</td>
<td width="37%">Producto</td>
</tr>
<?php
foreach($carro as $k => $v)
{
?>
<tr>
<td align="center"><?php echo $v['id'] ?></td>
<?php
WHERE id='".$v['id']."'");
{
?>
<td><?php echo $row2['medicamento'] ?></td>
<?php
}
?>
<td align="right"><?php echo $v['cantidad'] ?></td>
</tr>
<?php
}
?>
</table>
<p>
<center>
<table border="0" cellspacing="0" cellpadding="5" class="prod">
<tr valign="middle">
<td width="35%"> </td>
<td><a href="vercarrito.php">Anterior</a></td>
<td><input type="submit" name="enviar" value="Confirmar Pedido"></td>
<td width="35%"> </td>
</tr>
</table>
</form>
<?php
}
?>
</body>
</html>
<?php
?> -->
Por:
antes de confirmar el pedido y se dirija a facturar.php,
emita un mensaje para darle al usuario la eleccion de imprimir o no la pagina...se podra???
Gracias antemano sus colaboraciones