![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
10/12/2003, 11:58
|
| | Fecha de Ingreso: diciembre-2003
Mensajes: 34
Antigüedad: 21 años, 2 meses Puntos: 0 | |
Me sale un error, no se que hice mal...
En archivo contar.php puse esto:
<form action=contar.php method=post>
<input type=submit value=ingresar>
</form>
<?
$host = "localhost";
$user = "xxxxxx";
$pass = "xxxxxx";
$dbname = "xxxxxx";
$link = mysql_connect($host, $user, $pass);
mysql_select_db($dbname);
$sql="UPDATE counter SET contador=contador+1";
mysql_query($sql,$link);
$sql2="SELECT * FROM tabla";
$get=mysql_query($sql2,$link);
$data=mysql_fetch_array($get);
echo "Formulario accesado ".$data["contador"]." veces";
?>
y cree la tabla:
create table counter(contador int);
de esa manera...
El error es:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/arekutc/public_html/contar.php on line 16
Formulario accesado veces
Grax! |