En mi local va perfecto.
borra.php
Código PHP:
<?php include("cone.php"); ?>
<?
//recibimos la variable $id
$id=$_POST[id];
//borramos los registros pertenecientes a la id
mysql_query("delete from paquetes where id_web='$id'",$connect);
header("location: index.php");
?>
borrar.php:
Código PHP:
<?php include("cone.php"); ?>
<?php
//recibimos la variable $id
$id=$_GET[id];
//borramos los registros pertenecientes a la id
$result = mysql_query("delete from paquetes where id_web='$id'",$connect);
if (!$result) {
$message = 'Invalid query: ' . mysql_error() . "\n";
$message .= 'Whole query: ' . $query;
die($message);
}
header("location: at_esp_actualizar.php");
?>
actualizar.php
Código PHP:
<?php
// Conexion, seleccion de base de datos
$enlace = mysql_connect('localhost', '', '')
or die('No pudo conectarse : ' . mysql_error());
mysql_select_db(name_bd) or die('No pudo seleccionarse la BD.');
//Sentencia sql (sin limit)
$_pagi_sql = 'SELECT * FROM paquetes order by web Desc';
//cantidad de resultados por página (opcional, por defecto 20)
$_pagi_cuantos = 20;
//Incluimos el script de paginación. Éste ya ejecuta la consulta automáticamente
include("paginator.inc.php");
// Así escribimos la cabecera de la tabla
//Leemos y escribimos los registros de la página actual
echo '<table width="700" border="0" bgcolor="#B87C99"cellpadding="0" cellspacing="0" >';
echo '<tr>
<td></td>
<td > <font color="#FFFFFF"><strong>Hotel</strong></font></td>
<td></td>
<td ><font color="#FFFFFF"><strong>Tarifa por Noche</strong></font></td>
</tr>
<tr> <td width="30"><font color="#FFFFFF"><strong>WEB</strong></font></td>
<td width="140"><font color="#FFFFFF"><strong>Argentina</strong></font></td>
<td width="20"><font color="#FFFFFF">
<strong>*</strong></font></td>
<td width="100" align="center"><font color="#FFFFFF"><strong>Vigencia</strong></font></td>
<td width="30"><font color="#FFFFFF"><strong>SGL</strong></font></td>
<td width="30"><font color="#FFFFFF"><strong>DBL</strong></font></td>
<td width="30"><font color="#FFFFFF"><strong>TPL</strong></font></td>
<td width="30"><font color="#FFFFFF"><strong>SUITE</strong></font></td>
<td width="30" align="center"><img src="iconocama.gif" width="19" height="20"></td>
<td width="80"><font color="#FFFFFF"><strong>ADICIONAL</strong></font></td>
<td ><font color="#FFFFFF"><strong>Editar</strong></font></td>
<td ><font color="#FFFFFF"><strong>Borrar</strong></font></td>
</tr>';
while($row = mysql_fetch_array($_pagi_result)){
if ($colorfila==0){
$color= "#DEDEBE";
$colorfila=1;
}else{
$color="#F0F0F0";
$colorfila=0;
}
echo '<tr bgcolor='.$color.'>'.'<td>'.$row[web].'</td>'.'<td height="20" width="150" height="4" >'.'<strong>'.$row['hotel'].'</td>'.'</strong>'.'<td height="20" width="10" align = "left" >'.'<strong>'.$row['estrellas'].'</td>'.'</strong>'.'<td width="100" align = "center" >'.'<strong>'.$row['vigencia'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center" >'.'<strong>'.$row['sgl'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center" >'.'<strong>'.$row['dbl'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center" >'.'<strong>'.$row['tpl'].'</td>'.'</strong>'.'<td width="30" align = "center" >'.'<strong>'.$row['suite'].'</td>'.'</strong>'.'<td height="20" width="30" align = "center">'.'<strong>'.$row['cama'].'</td>'.'</strong>'.'<td height="20" width="80" align="center">'.'<strong>'.$row['adicional'].'</td>'.'</strong>'.
'<td >'.'<font color="#003399">'.'<a href="editar.php?id='.$row[id_web].'">'.editar.'</a>'.'</font>'.'</td>'
.'<td >'.'<font color="#004466">'.'<a href="borrar.php?id='.$row[id_web].'">'.eliminar.'</a>'.'</font>'.'</td>'.'</tr>'
;
}
//Incluimos la barra de navegación
echo"<p>".$_pagi_navegacion."</p>";
?>