Estoy haciendo un pequeño sistema de tickets para casos técnicos y me encuentro con varios problemas, el primero es que me gustaría que haya un select en el cual aparezca el campo de SQL status actual y me permita cambiarlo a otros predefinidos por ej "completo" o "cancelado" y dps que haciendo un click en por ej en el campo cliente de la tabla me lleve a otra página donde pueda ver mas cámpos partiendo del ID que le di antes.
Más abajo puse la parte del código que funciona OK, hay más para las funciones que dice arriba pero no anda de ninguna manera.
PD: Cualquier sugerencia que me den para mejorar lo que actualmente funciona OK es bienvenida solo tengan en cuenta dos cosas 1 ero que no tengo mucha experiencia como para aplicar código complejo y segundo que estoy usando la versión 5.2.5 de PHP con 5.0.51a de MySQL
Slds!!!
<?php
session_start();
if(!isset($_SESSION['loggedin'])) {header('Location: /index.php');
exit();
}
include ("includes/men

p.php");
include ("includes/setup.php");
?>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Tickets</title>
<link href="css/1.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="main" wid>
<p align="left">
<?php
$username = $_COOKIE['cookie1']['username'];
$horaactual = date("d-m-y H:i");
$link = mysql_connect($dbHost, $dbUser, $dbPass);
mysql_select_db("sac", $link);
$result = mysql_query("SELECT * FROM `tickets` WHERE status = 'activo' && responsable = '$username' ORDER BY `fecha_c` DESC", $link);
if ($row = mysql_fetch_array($result)){
echo "<table border = '0'> \n";
echo "<tr> \n";
echo "<td width=50 bgcolor=#A8C8aa><b>Fecha</b></td> \n";
echo "<td width=60 bgcolor=#A8C8aa><b>Referente</b></td> \n";
echo "<td width=60 bgcolor=#A8C8aa><b>Telefono</b></td> \n";
echo "<td width=60 bgcolor=#A8C8aa><b>Problema</b></td> \n";
echo "<td width=50 bgcolor=#A8C8aa><b>Producto</b></td> \n";
echo "<td width=700 bgcolor=#A8C8aa><b>Caso</b></td> \n";
echo "<td width=700 bgcolor=#A8C8aa><b>estado</b></td> \n";
echo "<Ver</b></td> \n";
echo "</tr> \n";
do {
$actual = time();
$calc=$actual-$row['delay']; ;
if ($calc < 3600) {
$color = "<td width=50 bgcolor=#E6FD97>";
}
elseif ($calc > 3601 && $calc <9600) {
$color = "<td width=50 bgcolor=#FFCC33>";
}
elseif ($calc >9600) {
$color = "<td width=50 bgcolor=#FF6666>";
}
else {
$color = "<td width=50 bgcolor=#555555>";
}
echo "<tr> \n";
echo $color.$row["fecha_c"]."</td>\n";
echo "<td width=60 bgcolor=#A8C8E1>".$row["referente"]."</td>\n";
echo "<td width=60 bgcolor=#A8C8E1>".$row["telefono"]."</td>\n";
echo "<td width=60 bgcolor=#A8C8E1>".$row["problema"]."</td>\n";
echo "<td width=50 bgcolor=#A8C8E1>".$row["producto"]."</td>\n";
echo "<td width=700 bgcolor=#A8C8E1>".$row["caso"]."</td>\n";
echo "<td width=700 bgcolor=#A8C8E1>".$row["status"]."</br>";
} while ($row = mysql_fetch_array($result));
} else {
echo "¡ vacio !";
}
?>