Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/02/2014, 14:03
AxelitoLatino1
 
Fecha de Ingreso: febrero-2014
Mensajes: 2
Antigüedad: 10 años, 2 meses
Puntos: 0
Respuesta: actualizar una consulta php

les dejo el codigo php que ise pero esta mal porque ala hora de actualizar
http://axelitolatino.com.ar/locutor/locutor-actual.php
deveria votarme la misma informacion que le di en activar pero bueno aqui les dejo el codigo
locutor.php :

<html>
<head>
<title>LOCUTOR ACTUAL</title>
</head>

<body>
<FORM action="locutor-actual.php" method="POST">
Seleccionar Locutor:
<select name="nombre" id="nombre">
<option value="">seleccione locutor</option>
<?php
$conexion=mysql_connect('','','') or die('No hay conexión a la base de datos');
$db=mysql_select_db('',$conexion)or die('no existe la base de datos.');
/* obtenemos los productos para mostrarlos en un combo-box */
$result=mysql_query("select * from locutor");
while ($row = mysql_fetch_array($result)){
echo "<option value='$row[id]'>$row[nombre]</option>";
}
mysql_free_result($result);
?>
</select>
<input type="submit" name="enviar" value="activar"/>
</form>
</body>
</html>

LOCUTOR-ACTUAL.php :
<?php
$conexion=mysql_connect('','','') or die('No hay conexión a la base de datos');
$db=mysql_select_db('',$conexion)or die('no existe la base de datos.');
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>locutor actual</title>
<style type="text/css">
body,td,th {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 11px;
line-height: 20px;
color: #65778c;
}
a:visited {
text-decoration: none;
color: #65778c;
}
a:hover {
text-decoration: none;
color: #FFCC33;
}
a:active {
text-decoration: none;
color: #65778c;
}
#informacion {
position:absolute;
left:120px;
top:-8px;
width:231px;
height:200px;
}
#foto {
position:absolute;
left:0px;
top:5px;
width:117px;
height:185px;
}
a.link {
text-decoration: none;
color: #08088A;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
padding: 0 0.2em;
-webkit-transition-property: color, background;
-moz-transition-property: color, background-color;
-o-transition-property: color, background-color;
transition-property: color, background-color;
}
a.link:hover {
color: #08088A;
text-decoration: none;
background-color: #00BFFF;
font-weight: bold;
font-family: "Comic Sans MS", cursive;
}
</style>
</head>
<body topmargin="0" leftmargin="0">
<div id="informacion"><?php
$nombre=$_POST['nombre'];
$result=mysql_query("select * from locutor WHERE id='$nombre'");
while($row = mysql_fetch_array($result)){
$nombre=$row['nombre'];
$facebook=$row['facebook'];
$informacion=$row['informacion'];
}
?>
<p><strong style='color: #0489B1;'>LOCUTOR:</strong> <?php echo "<font color=000000><b>$nombre</b></font>"; ?><br>
<strong style='color: #0066CC;'>FACEBOOK: </strong><a href='http://fb.com<?php echo "$facebook"; ?>' style='text-decoration:none;' target='_blank' class="link"> <?php echo "<font color=000000><b>$facebook</b></font>"; ?></a><br>

<strong style='color: #FF3300;'>INFORMACION:</strong> <?php echo "<font color=000000><b>$informacion</b></font>"; ?>
</div>
<div id="foto"><img src="../shoutcast/locutores/<?php echo "$row[locutor]"; ?>.jpg" width="117" height="185" style='border-radius:10px'></div>

</body>
</html>