![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
28/12/2003, 15:19
|
| | Fecha de Ingreso: julio-2002
Mensajes: 40
Antigüedad: 22 años, 6 meses Puntos: 0 | |
vote.php
<?php
include_once("../db/conex.php");
include_once("../poll0.1/pollid.php");
$link=Conectarse();
$voto=$_GET['voto'];
if ($voto == a) {
mysql_query("update poll set a = a+1, total = total+1 WHERE `poll_id` = '$id'",$link);
}
if ($voto == b) {
mysql_query("update poll set b = b+1, total = total+1 WHERE `poll_id` = '$id'",$link);
}
if ($voto == c) {
mysql_query("update poll set c = c+1, total = total+1 WHERE `poll_id` = '$id'",$link);
}
header("Location: /public_html/vote.php");
?>
ese es el archivo ke me da el error, no hay html.Ahora pongo el codigo de los 2 archivos del include:
conex.php:
<?php
function Conectarse()
{
if (!($link=mysql_connect("localhost","user","user")) )
{
echo "Error conectando a la base de datos.";
exit();
}
if (!mysql_select_db("portal",$link))
{
echo "Error seleccionando la base de datos.";
exit();
}
return $link;
}
?>
pollid.php:
<?php $id = 6; ?> |