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 digobueno les explico como lo tengo hecho para que veais por donde se puede tocar para modificar esoesta 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í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ágenes/pon-tu-anuncio_down.png','imágenes/dame-tu-opinion_down.png','imágenes/buscador_down.png','imágenes/ayuda_down.png','imá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"> </td>
<td bgcolor="#FFFFFF"><p> usuario : <a href="d">registrarse</a> | <a href="#">entrar</a> </p></td>
<td bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td width="76%" height="32%" valign="bottom"><h1 align="left"><span class="Estilo4"> tucasaenespañ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"> </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ágenes/menu_up_01.png" width="1059" height="3" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="imá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á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á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á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ágenes/menu_up_10.png" width="5" height="27" alt=""></td>
</tr>
<tr>
<td>
<img src="imágenes/menu_up_11.png" width="91" height="3" alt=""></td>
<td>
<img src="imágenes/menu_up_12.png" width="207" height="3" alt=""></td>
<td>
<img src="imágenes/menu_up_13.png" width="56" height="3" alt=""></td>
<td>
<img src="imá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> > registro </span></div></td>
</tr>
</table></td>
<th height="80" scope="col"> </th>
<th width="265" rowspan="2" scope="col"> </th>
</tr>
<tr>
<td height="519"> </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> </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"> </th>
<th width="53%" scope="col"> </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>Álava</option>
<option>Albacete</option>
<option>Alicante</option>
<option>Almería</option>
<option>Asturias</option>
<option>Ávila</option>
<option>Badajoz</option>
<option>Islas Baleares</option>
<option>Barcelona</option>
<option>Burgos</option>
<option>Cáceres</option>
<option>Cádiz</option>
<option>Cantabria</option>
<option>Castellón</option>
<option>Ciudad Real</option>
<option>Córdoba</option>
<option>La Coruña</option>
<option>Cuenca</option>
<option>Gerona</option>
<option>Granada</option>
<option>Guadalajara</option>
<option>Guipúzcoa</option>
<option>Huelva</option>
<option>Huesca</option>
<option>Jaén</option>
<option>La Rioja</option>
<option>León</option>
<option>Lérida</option>
<option>Lugo</option>
<option>Madrid</option>
<option>Má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é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ñ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"> </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ítica de privacidad</a> </span></label></td>
</tr>
<tr>
<td height="46"> </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ó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)