Código PHP :
<a href="modificaciones/anularop.php?accion=anular&orden=<?php echo $orden; ?>"><img src='imgs/cerrar.png' height="30" width="30" border="0"/></a>
y en el archivo anular OP tengo esto:
Código PHP :
<?php
include ("../conexion_bd.php");
mb_internal_encoding( 'UTF-8' );
session_start();
$_SESSION['rol'];
$_SESSION['nombre'];
$_SESSION['ultimoAcceso'];
function actual_date () {
$months = array ("", "Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Septiembre", "Octubre", "Noviembre", "Diciembre");
$year_now = date ("Y");
$month_now = date ("n");
$day_now = date ("j");
$week_day_now = date ("w");
$date = $day_now . " de " . $months[$month_now] . " de " . $year_now;
return $date;
}
if(isset($_GET['orden'])){
$orden=$_GET['orden'];
if(isset($_GET['accion'])){
$result = mysql_query("SELECT Historial_ediciones FROM ordenes WHERE Numero='$orden' ",$con);
while($row = mysql_fetch_array($result)){
$historial=$row['Historial_ediciones'];
}
if($_GET['accion']=="anular"){
$actdate=actual_date();
$historial .= "<br/>OP anulada el ".$actdate." por: ". $user .".";
mysql_query("UPDATE ordenes SET Estado = '8', Responsable = 'T&M', Historial_ediciones='$historial' WHERE Numero = '$orden'");
header( 'Location: ../tabla.php');
}
}
else{
header( 'Location: ../home.php');
}
}
else{
header( 'Location: ../home.php') ;
}
?>Va y vuelve a tabla.php pero no hace el UPDATE, alguien sabe que estoy haciendo mal?? Soy muy nueva en esto, muchas gracias....
