Ayuda! crear proyecto, muy motivado.

Nuevas dudas:

bueno como podéis ver entrando a www.tucasaenespaña.com tengo el registro ya hecho y cuando alguien se registra lo hace automaticamente en la base de datos, ¿por fin!! jeje pero no esta funcionando correctamente aun..


1) os registrais completando todos los datos os aparece una pag en blanco que pone: "Los datos han sido introducidos satisfactoriamente " y bueno me gustaria cambiar eso y que aparesca una pag (una pag que yo cree en html)


2) si no completas los datos os aparecera una pag en blanco que pone: "Error, no ha introducido todos los datos " y me gustaria que aparesca un boton que ponga volver (para darle link a la zona de registro de nuevo)


3) os podeis registrar y la casilla de verificación no la aceptais y se hace el registro igualmente (me gustaria que sea obligatorio aceptarla):


todo esto lo podeis comprar ustedes mismo entrando en la web, no importa que me llegue el registro probarlo para que veais todo lo que les digo



bueno les explico como lo tengo hecho para que veais por donde se puede tocar para modificar eso

esta es la pag de registro donde tengo el diseño hecho en .html

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin t&iacute;tulo</title>
<style type="text/css">
<!--
.Estilo3 {font-size: 9px}
body {
	margin-left: 7%;
	margin-right: 7%;
	margin-top: 1%;
	margin-bottom: 1%;
}
.Estilo4 {font-size: 30px; font-family: Ethnocentric;}
.Estilo5 {font-size: 12px; font-family: Arial;}
body,td,th {
	font-family: Arial;
	font-size: 16px;
}
#Layer1 {
	position:absolute;
	left:352px;
	top:250px;
	width:530px;
	height:403px;
	z-index:1;
}
#Layer2 {
	position:absolute;
	left:522px;
	top:286px;
	width:186px;
	height:81px;
	z-index:1;
}
#Layer3 {
	position:absolute;
	left:760px;
	top:634px;
	width:253px;
	height:154px;
	z-index:2;
}
.Estilo8 {font-size: 24px}
.Estilo11 {font-size: 14px}
#Layer4 {
	position:absolute;
	left:755px;
	top:620px;
	width:226px;
	height:140px;
	z-index:2;
}
-->
</style>
<script type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('im&aacute;genes/pon-tu-anuncio_down.png','im&aacute;genes/dame-tu-opinion_down.png','im&aacute;genes/buscador_down.png','im&aacute;genes/ayuda_down.png','im&aacute;genes/tu-opinion_down.png')">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="75" valign="top" bgcolor="#FFFFFF"><table width="100%" height="83%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td bgcolor="#FFFFFF">&nbsp;</td>
        <td bgcolor="#FFFFFF"><p> usuario : <a href="d">registrarse</a> | <a href="#">entrar</a> </p></td>
        <td bgcolor="#FFFFFF">&nbsp;</td>
      </tr>
      <tr>
        <td width="76%" height="32%" valign="bottom"><h1 align="left"><span class="Estilo4"> tucasaenespa&ntilde;a.</span><span class="Estilo5">com</span></h1></td>
        <td width="24%" colspan="2"><img src="imagenes/logo de la pag - copia (2).png" alt="log de web" width="180" height="73" longdesc="log de tucasaenespaña"></td>
      </tr>
      <tr>
        <td height="18">&nbsp;</td>
        <td colspan="2" valign="top"><div align="center" class="Estilo3">
          <div align="left">
            <blockquote>
              <p align="left" class="Estilo3">comprar, vender y alquilar </p>
            </blockquote>
          </div>
        </div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td height="594" valign="top"><table width="100%" height="39" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="39">
		<table id="Tabla_01" width="1059" height="30" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td colspan="9">
			<img src="im&#xe1;genes/menu_up_01.png" width="1059" height="3" alt=""></td>
	</tr>
	<tr>
		<td rowspan="2">
			<img src="im&#xe1;genes/menu_up_02.png" width="3" height="27" alt=""></td>
		<td>
			<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('buscador','','imágenes/buscador_down.png',1)"><img src="imágenes/buscador_up.png" alt="buscador" name="buscador" width="91" height="24" border="0"></a></td>
		<td rowspan="2">
			<img src="im&#xe1;genes/menu_up_04.png" width="6" height="27" alt=""></td>
		<td>
			<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('pon tu anuncio','','imágenes/pon-tu-anuncio_down.png',1)"><img src="imágenes/pon-tu-anuncio_up.png" alt="pon tu anuncio gratis" name="pon tu anuncio" width="207" height="24" border="0"></a></td>
		<td rowspan="2">
			<img src="im&#xe1;genes/menu_up_06.png" width="5" height="27" alt=""></td>
		<td>
			<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('ayuda','','imágenes/ayuda_down.png',1)"><img src="imágenes/ayuda_up.png" alt="ayuda" name="ayuda" width="56" height="24" border="0"></a></td>
		<td rowspan="2">
			<img src="im&#xe1;genes/menu_up_08.png" width="592" height="27" alt=""></td>
		<td>
			<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('tu opinion','','imágenes/tu-opinion_down.png',1)"><img src="imágenes/tu-opinion_up.png" alt="tú opinión" name="tu opinion" width="94" height="24" border="0"></a></td>
		<td rowspan="2">
			<img src="im&#xe1;genes/menu_up_10.png" width="5" height="27" alt=""></td>
	</tr>
	<tr>
		<td>
			<img src="im&#xe1;genes/menu_up_11.png" width="91" height="3" alt=""></td>
		<td>
			<img src="im&#xe1;genes/menu_up_12.png" width="207" height="3" alt=""></td>
		<td>
			<img src="im&#xe1;genes/menu_up_13.png" width="56" height="3" alt=""></td>
		<td>
			<img src="im&#xe1;genes/menu_up_14.png" width="94" height="3" alt=""></td>
	</tr>
</table>
		</td>
      </tr>
    </table>
      <table width="100%" height="646" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td width="265" rowspan="2" valign="top" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td scope="col"><div align="left"><span class="Estilo11"><a href="s">inicio</a> &gt; registro </span></div></td>
            </tr>
          </table></td>
          <th height="80" scope="col">&nbsp;</th>
          <th width="265" rowspan="2" scope="col">&nbsp;</th>
        </tr>
        
        <tr>
          <td height="519">&nbsp;</td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" id="Layer3" name="Layer3">
        <tr>
          <th scope="col"><img src="imagenes/toro-espanol - copia.png" width="250" height="160"></th>
        </tr>
      </table>
      <p>&nbsp;</p>
      <table width="100%" border="1" cellpadding="0" cellspacing="0" id="Layer1">
        <tr>
          <th height="34" class="Estilo8" scope="col">registro de usuario </th>
        </tr>
        <tr>
          <td valign="top" bgcolor="#FFFF00">
		  
		  
	  
		  
		  <form name="form1" method="post" action="insertar.php">
            <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFF00">
              <tr>
                <th width="47%" height="18" scope="col">&nbsp;</th>
                <th width="53%" scope="col">&nbsp;</th>
              </tr>
              <tr>
                <td height="35" bgcolor="#FFFF00"><blockquote>
                  <p><strong>tipo de usuario  :</strong></p>
                </blockquote></td>
                <td><label>
                <select name="usuario" id="usuario">
                  <option selected>particular</option>
                  <option>profesional</option>
                </select>
                </label></td>
              </tr>
              <tr>
                <td height="35"><blockquote>
                  <p><strong>nombre:</strong></p>
                </blockquote></td>
                <td><label>
                  <input name="nombre" type="text" id="nombre" size=30 maxlength=50>
                </label></td>
              </tr>
              <tr>
                <td height="35" align="left"><blockquote>
                  <p><strong>provincia:</strong></p>
                </blockquote></td>
                <td height="35"><label>
                  <select name="provincia" id="provincia">
                    <option selected> -- SELECCIONAR --</option>
                    <option>&Aacute;lava</option>
                    <option>Albacete</option>
                    <option>Alicante</option>
                    <option>Almer&iacute;a</option>
                    <option>Asturias</option>
                    <option>&Aacute;vila</option>
                    <option>Badajoz</option>
                    <option>Islas Baleares</option>
                    <option>Barcelona</option>
                    <option>Burgos</option>
                    <option>C&aacute;ceres</option>
                    <option>C&aacute;diz</option>
                    <option>Cantabria</option>
                    <option>Castell&oacute;n</option>
                    <option>Ciudad Real</option>
                    <option>C&oacute;rdoba</option>
                    <option>La Coru&ntilde;a</option>
                    <option>Cuenca</option>
                    <option>Gerona</option>
                    <option>Granada</option>
                    <option>Guadalajara</option>
                    <option>Guip&uacute;zcoa</option>
                    <option>Huelva</option>
                    <option>Huesca</option>
                    <option>Ja&eacute;n</option>
                    <option>La Rioja</option>
                    <option>Le&oacute;n</option>
                    <option>L&eacute;rida</option>
                    <option>Lugo</option>
                    <option>Madrid</option>
                    <option>M&aacute;laga</option>
                    <option>Murcia</option>
                    <option>Navarra</option>
                    <option>Orense</option>
                    <option>Palencia</option>
                    <option>Las Palmas</option>
                    <option>Pontevedra</option>
                    <option>Salamanca</option>
                    <option>Tenerife</option>
                    <option>Segovia</option>
                    <option>Sevilla</option>
                    <option>Soria</option>
                    <option>Tarragona</option>
                    <option>Teruel</option>
                    <option>Toledo</option>
                    <option>Valencia</option>
                    <option>Valladolid</option>
                    <option>Vizcaya</option>
                    <option>Zamora</option>
                    <option>Zaragoza </option>
                  </select>
                </label></td>
              </tr>
              <tr>
                <td height="35"><blockquote>
                  <p><strong>email de contacto: </strong></p>
                </blockquote></td>
                <td><label>
                  <input name="email" type="text" id="email" size=30 maxlength=50>
                </label></td>
              </tr>
              <tr>
                <td height="35"><blockquote>
                  <p><strong>tel&eacute;fono de contacto: </strong></p>
                </blockquote></td>
                <td><label>
                  <input name="telefono" type="text" id="telefono" size=30 maxlength=20>
                </label></td>
              </tr>
              <tr>
                <td height="35"><blockquote>
                  <p><strong>contrase&ntilde;a:</strong></p>
                </blockquote></td>
                <td><label>
                  <input name="clave" type="password" id="clave" size=30 maxlength=40>
                </label></td>
              </tr>
              <tr>
                <td height="45">&nbsp;</td>
                <td><label>
                    <input name="acepto" type="checkbox" id="acepto" value="checkbox">
                    <span class="Estilo11">acepto las <a href="q">condiciones de uso</a> y la <a href="q">pol&iacute;tica de privacidad</a> </span></label></td>
              </tr>
              <tr>
                <td height="46">&nbsp;</td>
                <td><label>
                  <input type="submit" name="Submit" value="registrar">
                </label></td>
              </tr>
            </table>
                    </form>
          </td>
        </tr>
      </table>      
    </td>
  </tr>
  <tr>
    <td height="10" bgcolor="#F2F2F2" border="1" ><div align="center">
      <p align="left"><a href="google.com">conoce la web </a> | <a href="google.com">contacto</a> | <a href="google.com">condici&oacute;n de uso</a></p>
    </div></td>
  </tr>
  <tr>
    <td height="10" bgcolor="#FFFFFF"><div align="center"></div></td>
  </tr>
  <tr>
    <td height="10" bgcolor="#FFFFFF"><div align="center"></div></td>
  </tr>
  <tr>
    <td height="16" bgcolor="#FFFFFF"><div align="center">
      <p>anuncio google </p>
    </div></td>
  </tr>
</table>
</body>
</html>


esta es el código php que lo tengo aparte en otro archivo al que llame insertar.php
<?
    // Primero comprobamos que ningún campo esté vacío y que todos los campos existan.
    if(isset($_POST['usuario']) && !empty($_POST['usuario']) &&
    isset($_POST['nombre']) && !empty($_POST['nombre']) &&
    isset($_POST['provincia']) && !empty($_POST['provincia']) &&
    isset($_POST['email']) && !empty($_POST['email']) &&
    isset ($_POST['telefono']) && !empty($_POST['telefono']) &&
    isset ($_POST['clave']) && !empty($_POST['clave'])) {

        // Si entramos es que todo se ha realizado correctamente

        $link = mysql_connect("localhost","xntucasa_ayose","********");
        mysql_select_db("xntucasa_base1",$link);

        // Con esta sentencia SQL insertaremos los datos en la base de datos
        mysql_query("INSERT INTO usuarios (usuario,nombre,provincia,email,telefono,clave)
        VALUES ('{$_POST['usuario']}','{$_POST['nombre']}','{$_POST['provincia']}','{$_POST['email']}','{$_POST['telefono']}','{$_POST['clave']}')",$link);

        // Ahora comprobaremos que todo ha ido correctamente
        $my_error = mysql_error($link);

        if(!empty($my_error)) {

            echo "Ha habido un error al insertar los valores. $my_error"; 

        } else {

            echo "Los datos han sido introducidos satisfactoriamente";

        }

    } else {

        echo "Error, no ha introducido todos los datos";

    }

?>



en el archivo .html en la etiqueta de formulario le puse en accion= "insertar.php" y asi me lee y me actua con la base de dato.


y bueno ya sabiendo como funciana esto aver si alguien me puede ayudar y encontrar las formas para poner lo que explico al principio en 1),2),3)
Colcoa la pagina de registro index.php e introduce todo el codigo HTML dentro de la misma para obtener facilmente lo que deseas.

Un saludo.
victor hice lo que tu dices, pero lo que yo quiero es que al registrarse aparesca otra pag, sabes para poner bienvenido y eso, como tu dices lo que ocurre es que pone el tecto que tenia en la otra pag aparece en la misma con elregistro y todo.l

noc si me explico bien lo que quiero
Si que te explicas; pero si aplicas lo que has aprendido, con ifs sabras cuando mostrar el formulario de registro, cuando decirle que enhorabuena por registrarse, o cuando decirle al usuario que ha cometido un error, cuestion de recojer variables y usar ifs.
Hola,
El tiempo que estás perdiendo en hacer tu página, quizá deberias invertirlo en el marketing de la empresa y dejar que otro te haga la página. Hay empresas que te cobran muy poquito ahora por una web de calidad(la empresa que hice la mia, pagué 300 euros y me enseñaron para que la edite yo mismo). Te paso la que conozco pero sé que hay muchas otras:
http://necesitasunapaginaweb.com/
Saludos
raul3384, y en esa página te enseñaron tambien a llenar de spam un foro por lo que se ve...

pero si estoy aqui es porque no solo me interesa crear una empresa, sino aprender a crear paginas web, sino ya se lo hubiera dicho a alguna empresa y no estaria perdiendo mi tiempo aqui, pero como no es así aqui estoy.

Y bueno si te crearon tu empresa como dices y no lo haces con la intención de hacer spam, que buen cliente eres, que como agradecimiento vas recomendandoselo a todo el mundo.

Un saludo y gracias por la información.
jejeej !! bueno ahora estoy creando otra web más sencilla y así voy practicando con un curso que estoy viendo de php y cuando tenga unos conocimientos mejores ya sigo con este que me queda algunas cosillas (que viene a ser toda la programacion php).

Olle victor sobre lo que me dijistes por otro post del grado superior de técnico de desarrollo de aplicaicones informatica (lo estuve viendo y se donde lo dan ya aquí en las palmas), y estuve viendo su temario y ¿que es todo general sobre informática? porque estuve viendo y había un apartado de desarrollo de aplicaciones web y no me quedo claro si era un grado entero sobre eso o un apartado del grado. Ya el martes llamo aver tambien y así me informan mejor.
Puesto que vas a hablar con ellos, te explicaran ellos mejor que yo, asi que despues, cualquier pregunta que tengas me lo dices x MP (si prefieres) y te lo respondo.

Un saludo.