Ver Mensaje Individual
  #1 (permalink)  
Antiguo 03/10/2008, 17:59
elmath
 
Fecha de Ingreso: octubre-2008
Mensajes: 7
Antigüedad: 15 años, 7 meses
Puntos: 0
pregunta de novato

hola gente como andan? bueno les cuento que soy totalmente nuevo en el tema del php y tengo una pregunta que creo que a ustedes le va a parecer facil...
tengo esto...


funciones.php
Cita:
<?php
//esta puesto por ahora porque no se como invocar una funcion
agregar_jugadores();

function agregar_jugadores(){
include("conexion.php");
$link=Conectar();
$des=$_GET['desc'];
$gid=$_GET['gid'];
$id=012123;
mysql_query("insert into jugadores (id,gid,descripcion) values ('$id','$gid','$desc')",$link);
}
?>
y un index.html
Cita:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>MZ Uruguay Skiller</title>
</head>
<body>
<form method="post" action="funciones.php">
<textarea name="desc" id="desc" cols="60" rows="15"></textarea>
<input type="text" name="gid" size="7">
<input type="submit" name="cargar" id="cargar" value="Enviar">
</form>

</body>
</html>

y lo que quiero hacer es "invocar" a la funcion agregar_jugadores y que esta tome los valores ingresados en el textarea y en el text...

desde ya muchas gracias y perdon si es muy mala la pregunta jaja...

saludos!