Foros del Web » Programando para Internet » PHP »

Duda sobre base de datos para equipo de futbol

Estas en el tema de Duda sobre base de datos para equipo de futbol en el foro de PHP en Foros del Web. Hola, estoy con un proyecto de pagina web para equipo de futbol, donde hay una pagina que es donde cada jugador al hacer click en ...
  #1 (permalink)  
Antiguo 04/11/2010, 08:58
 
Fecha de Ingreso: noviembre-2010
Mensajes: 4
Antigüedad: 13 años, 6 meses
Puntos: 0
Duda sobre base de datos para equipo de futbol

Hola, estoy con un proyecto de pagina web para equipo de futbol, donde hay una pagina que es donde cada jugador al hacer click en Asisteré, la tabla automaticamente cambia al valor Si, o si hace click en Borrar, pues se borra el si y sale no. Les adjunto el codigo Html para que lo entiendan un poco mejor.

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
		<title>Olivereta United.tk</title>
		<link href="style.css" rel="stylesheet" type="text/css" media="all"/>
	</head>



<body>
	<div id="container">

		<div id="main-title"><span style="font-weight: 400"><font face="Arial Black" style="font-size: 9"><span style="font-weight: 400">Olivereta United</span></font></span></div>
		<div id="header-image"></div>
		<div id="navbar">

			<font face="Arial Black" style="font-size: 9">

			<a href="Equipo.html"><span style="font-weight: 400">Equipo</span></a><span style="font-weight: 400"> ||
			</span>
		<a href="Contacto.html"><span style="font-weight: 400">Contacto</span></a><span style="font-weight: 400"> ||
			</span>
		<a href="Proximo partido.html"><span style="font-weight: 400">Próximo partido</span></a></font></div>
    <div id="body">
			<h1><font face="Arial">Viernes, 05/11/2010</font></h1>
			<div id="main-text">
            <title></title>
            <title></title>
            <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
			<link href="Proximo partido.html" rel="stylesheet" type="text/css">

              <p class="byline">&nbsp;</p>
            <table width="320" border="0" align="center">
              <span class="texto9"></span>
              <tbody>
                <tr>
                  <form action="index.php">
                    <td width="100" align="center"><span class="texto50" id="main-text2">Marcos</span></td>
                    <td width="50" align="center"><span class="texto9">NS/NC</span></td>
                    <td width="100" align="center"><input class="texto86" value="Apuntarse" type= "submit" /></td>
                    <input value="1" 
                type="hidden" name="id" />
                  </form>
                  <form action="index.php">
                    <td width="100" align="center"><input class="texto86" value="Borrarse" type="submit" /></td>
                    <input value="86" 
                type="hidden" name="borrar" />
                  </form>
                </tr>
                   <tr>
                  <form action="index.php">
                    <td width="100" align="center"><span class="texto50" id="main-text2">Jose Miguel</span></td>
                    <td width="50" align="center"><span class="texto9">NS/NC</span></td>
                    <td width="100" align="center"><input class="texto86" value="Apuntarse" type="submit" /></td>
                    <input value="86" 
                type="hidden" name="id" />
                  </form>
                  <form action="index.php">
                    <td width="100" align="center"><input class="texto86" value="Borrarse" type="submit" /></td>
                    <input value="86" 
                type="hidden" name="borrar" />
                  </form>
                </tr>
              </tbody>
            </table>
            <p class="left">&nbsp; </p>
            <p class="left">Jugadores disponibles: 5</p>
            <p class="left">&nbsp;</p>
<p class="byline">&nbsp;</p>
<div id="footer">
  <div> <font face="Arial Black" class="current">Designed by <a href="http://www.f8d.net">f8d</a>, modificated by Marcos Eslava</font></div>
			  </div>
			</div>
		</div>

	</div>

	</body>
</html>
Yo estoy intentando con php, pero claro creo que me hace falta la base de datos, y mi intento es este:

Código:
DROP DATABASE IF EXISTS equipo;
CREATE DATABASE equipo;
USE biblioteca;
DROP TABLE IF EXISTS jugador;
CREATE TABLE jugador (
jugador VARCHAR(3),
Si VARCHAR (3)
);

USE equipo;
INSERT INTO jugador (jugador, si)
VALUES (
'Marcos','NS/NC'
);
USE equipo;
INSERT INTO libro (jugador, si)
VALUES (
'Jose Miguel','NS/NC'
);
USE equipo;
INSERT INTO libro (jugador, si)
VALUES (
'Joaquin','NS/NC'
);

CREATE TABLE comercios ( 
    co_jugador varchar(3) NOT NULL default '', 
    co_si varchar(3) NOT NULL default '', 
    UNIQUE KEY co_id (co_id) 
    ) TYPE=MyISAM;
¿Como resolverían este problema? Estoy dispuesto a otras opciones, he buscado por el foro, incluso con checkbox, pero claro, lo dificil esta en que cada vez que entre un jugador vea si el anterior jugador asiste o no. Muchas gracias de antemano.

Etiquetas: equipo, futbol
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 10:49.