Hola, soy El Menda. Estoy haciendo una encuesta y me da un monton de errores. A ver si me ayudais.
<?
$link = mysql_connect("$hostskt", "$userskt", "$passwordskt");
mysql_select_db("$baseskt", $link);
function muestra_result($numero)
{
$tem = mysql_query("SELECT tema FROM votos;", $link);
$tema = mysql_fetch_array($tem);
echo "<html><head><LINK href='archivos/style.css' rel=stylesheet type=text/css></head><body bgcolor='#3494C2'><table align='left' border='0' cellpadding='0' cellspacing='0'><tr><td><small&g t;<b><img src='archivos/cuadro.gif' width='3' height='3'>
&nbsp;".$tema["tema"]."</b></small><br><br>";
$total = mysql_fetch_row(mysql_query("SELECT sum(votos) FROM votos;", $link));
$total = $total[0];
//error
$ident = mysql_query("SELECT * FROM votos ORDER BY id DESC;", $link);
///error
while($res = mysql_fetch_array($ident)) {
$por = number_format(porcentaje($res['votos'], $total),2,",",".");
echo "<tr><td>".$res['opcion']."</td><tr><td>".barra($res['votos'], $total , $por)."&nbsp;".$por."% </td></tr><tr>";
}
mysql_free_result($ident);
echo "</table></td></tr></table>";
if ($total<=0)
return 0;
return ( ($num*100) / $total );
if ($total<=0)
$largo = 0;
else
$largo = ($num*$largo_total) / $total;
return '<img border=0 src="izq.png" width="7" height="14"><img border=0 src="izq.png" width="'.$largo.'" height="14" alt="'.$por.'%"><img border=0 src="izq.png" width="7" height="14">';
}
echo muestra_result($numero);
?>
Gracias
<a href="http://www.multimania.com/sktextreme" target="new">No sabes lo que te pierdes</a>
El Menda no te ayuda