Ver Mensaje Individual
  #8 (permalink)  
Antiguo 09/03/2008, 18:09
opzina
 
Fecha de Ingreso: marzo-2008
Mensajes: 1.020
Antigüedad: 16 años, 1 mes
Puntos: 21
Re: (Ayuda) Encuesta algunos errores

resultados.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>Documento sin t&iacute;tulo</title>
</head>

<body>
<html>
<head>
<title>Resultados de la encuesta</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
background-color: #FFFFDD;
}
td {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
}
-->
</style>
</head>
<body>
<?
$servidor = "localhost";
$usuario = "w1070536";
$password = "kuzufiSO13";
$base_de_datos = "w1070536_encuesta";
$conextar=mysql_connect ($servidor,$usuario,$password);
mysql_select_db($base_de_datos);
//$sqlupdate = "UPDATE encuestas SET valor$voto = valor$voto+1, total = total+1";
//mysql_query($sqlupdate,$conextar);
$sql = "SELECT * FROM encuestas ORDER BY idencuesta desc LIMIT 1";
$resultados = mysql_query($sql,$conextar);
$row = mysql_fetch_array($resultados);
$res1= round ($row['valor1']*100/$row['total'],2);
$res2= round ($row['valor2']*100/$row['total'],2);
$res3= round ($row['valor3']*100/$row['total'],2);
?>
<p>Resultados parciales de la encuesta</p>
<?=$row['¿Quién ganará el torneo?']; ?><br>
<br>

<TABLE WIDTH="300" BORDER="1" ALIGN="center" BORDERCOLOR="#3097A3">
<TR>
<TD WIDTH="100"><?=$row['Boca']; ?></TD>
<TD WIDTH="*"><IMG SRC="barra.gif" WIDTH="15" HEIGHT="25" border="0"></TD>
<TD ALIGN="center" WIDTH="70"><? echo $res1."%";?> </TD>
</TR>
<TR>
<TD WIDTH="100" ><?=$row['River']; ?></TD>
<TD WIDTH="*"><IMG SRC="barra.gif" WIDTH="15" HEIGHT="25" border="0"></TD>
<TD ALIGN="center" WIDTH="70"><? echo $res2."%";?> </TD>
</TR>
<TR>
<TD WIDTH="100"><?=$row['Lanus']; ?></TD>
<TD WIDTH="*"><IMG HEIGHT="25" WIDTH="15" SRC="barra.gif"></TD>
<TD ALIGN="center" WIDTH="70"><? echo $res3."%";?> </TD>
</TR>
</TABLE>
<form name="form1" method="post" action="">
<div align="center">
<p>
<input type="submit" name="Submit" value="Cerrar Ventana" onclick="window.close();">
</p>
<p>&nbsp; </p>
</div>
</form>
</body>
</html>
</body>
</html>