Código PHP:
<?PHP
require("conexion_mysql.inc");
require("inscrip2.INC");
$db = conectar_base_datos();
$id= $_REQUEST['id'];
$firstname= $_REQUEST['nombre'];
$lastname=$_REQUEST['apellido'];
$birthday=$_REQUEST['fecha'];
$nation=$_REQUEST['nation'];
$info=$_REQUEST['info'];
$checked_out=$_REQUEST['checked_out'];
$checked_out_time=$_REQUEST['checked_out_time'];
$s=inscrip($id,$nombre,$apellido,$fecha,$nation,$info,$checked_out,$checked_out_time);
echo 'INSCRIPCION OK';
?>
<html>
<head>
</head>
<FORM ACTION="jugadores.php" METHOD="GET">
<table width="1156" border="0" cellspacing="0" cellpadding="3" align="center">
<tr>
<td width='54'>ID:</td>
<td width="512">
<input type="text" name="id" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>Nombre:</td>
<td width="512">
<input type="text" name="nombre" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>Apellido:</td>
<td width="512">
<input type="text" name="apellido" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>Fecha de Nacimiento: (10/03/80)</td>
<td width="512">
<input type="text" name="fecha" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>Nacionalidad:</td>
<td width="512">
<input type="text" name="nation" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>Equipo:</td>
<td width="512">
<input type="text" name="info" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>checked_out:</td>
<td width="512">
<input type="text" name="checked_out" size="20" maxlength="32" tabindex="9">
</td>
</tr>
<tr>
<td width='54'>checked_out_time:</td>
<td width="512">
<input type="text" name="checked_out_time" size="20" maxlength="32" tabindex="9">
</td>
</tr>
</table>
<p align="left">
<INPUT TYPE="submit" VALUE="Enviar"> </p>
</form>
</html>
Código PHP:
<?php
function inscrip($id,$nombre,$apellido,$fecha,$nation,$info,$checked_out,$checked_out_time)
{
global $db;
$upd = "INSERT INTO jos_joomleague_players VALUES('$id','$nombre','$apellido','$fecha','$nation','$info','$checked_out','$checked_out_time')";
$res = mysql_query($upd,$db);
if(!$res)
return(0);
return(1);
}
?>