Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/08/2008, 13:55
lord_clon
 
Fecha de Ingreso: agosto-2008
Mensajes: 1
Antigüedad: 15 años, 8 meses
Puntos: 0
Incrustar datos segun resultado de Mysql

Hola , queria saber si me peden ayudar con esto. necesito que dada una busqueda en una tabla mysql, que todas en la condicion "SI" pone el Nro en Verde y me lo habilita a abrir un php determinado .... si la condicion es "NO" , que pinte el nro en rojo y que al hacer click me mande a otra pagina.... qui les pego el codigo ...... agradezco su ayuda
<?PHP
//define estilo de pagina
echo ('<style type="text/css">
<!--
.style3 {
font-family: "Trebuchet MS";
font-weight: bold;
font-size: xx-large;
color: #00CC00
}

.style6 {font-size: xx-large}
body,td,th {
font-family: Trebuchet MS;
}
a {
font-family: Trebuchet MS;
color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
color: #00CC00;
}
a:active {
text-decoration: none;
}
-->
</style>');
session_start();
include "conebase.php";
$tablero = mysql_query("SELECT * FROM chequeo WHERE pa=si, $conexion");
$columna= mysql_fetch_row($tablero);

//crea tabla de llavero virtual
echo '
<table width="14%" height="57%" border="4">
<tr align="center" valign="top" class="style6">
<td><a href="cargallaves.html">01</a></td>
<td>02</td>
<td>03</td>
<td>04</td>
<td>05</td>
<td>06</td>
<td>07</td>
<td>08</td>
<td>09</td>
<td>10</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="style6">
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
<td>18</td>
<td>19</td>
<td>20</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="style6">
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="style6">
<td>31</td>
<td>32</td>
<td>33</td>
<td>34</td>
<td>35</td>
<td>36</td>
<td>37</td>
<td>38</td>
<td>39</td>
<td>40</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr class="style6">
<td>41</td>
<td>42</td>
<td>43</td>
<td>44</td>
<td>45</td>
<td>46</td>
<td>47</td>
<td>48</td>
<td>49</td>
<td>50</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>
';


echo "Usuario Conectado:........ ". $_SESSION['username'] ;
echo '<BR><BR><P><a href="cargallaves.html"><strong>Agregar Llaves</strong></a></P>';
echo '<BR><P><a href="modibase.php"><strong>Modifica Llaves</strong></a></P>'
?>