10/08/2005, 14:22
|
|
este es mi formulario.. por alguna razón en especial, no me salta un error, al apretar el botón de submit, q diga, NO ACEPTASTE EL CONTRATO, o, lo deja pasar, entienden?
<?php
session_start();
if(!isset($_SESSION['idioma'])){
$_SESSION['idioma'] = 'spanish';
}
include("lang/".$_SESSION['idioma'].".inc.php");
?>
<html>
<head>
<script language="javascript" type="text/javascript" defer>
function validaEmail(user_email)
{
var re = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/;
if (!re.test(user_email)) {
alert ("Dirección de email inválida");
return false;
}
return true;
}</script>
<script language="JavaScript">
function pregunta(){
if (confirm('Estas seguro de enviar este formulario?')){
document.formu.submit()
}
}
</script>
<style type="text/css">
<!--
body {
SCROLLBAR-FACE-COLOR:#6699CC;
SCROLLBAR-HIGHLIGHT-COLOR: #6699CC;
SCROLLBAR-SHADOW-COLOR: #6699CC;
SCROLLBAR-3DLIGHT-COLOR: #FFFFFF;
SCROLLBAR-ARROW-COLOR: #FFFFFF;
SCROLLBAR-TRACK-COLOR: #E3E3E3;
SCROLLBAR-DARKSHADOW-COLOR: #000000;
}
-->
</style>
<script language="JavaScript">
function estado(){
if (document.formu.chk.checked)
alert("Marcado");
formulario.submit()
else
alert("Desmarcado");
}
</script>
<script>
function ChequearTodos(chkbox)
{
for (var i=0;i < document.forms[0].elements.length;i++)
{
var elemento = document.forms[0].elements[i];
if (elemento.type == "checkbox")
{
elemento.checked = chkbox.checked
}
}
}
</script>
<style type="text/css">
<!--
input { font-family: Tahoma, Verdana, Arial; font-size: 11px; color:
#FFFFFF; background-color: #009900; border:blue; border-style: solid;
border-top-width: 1px; border-right-width: 1px; border-bottom-width:
1px; border-left-width: 1px}
select { font-family: Tahoma, Verdana, Arial; font-size: 11px; color:
#FFFFFF; background-color: #009900; border: #blue; border-style: solid;
border-top-width: 1px; border-right-width: 1px; border-bottom-width:
1px; border-left-width: 1px}
-->
</style>
</head>
<body>
<body bgcolor=#009900 link=#009900 alink=#009900 vlink=#009900>
<form name="formu" method="post" id=formulario action="registrar.php"
onSubmit="return validaEmail(this.user_email.value);">
<p><?php echo nombreform;?>*
<input type="text" name="nombre" SIZE="12" MAXLENGTH="40">
</p>
<p><?php echo apellidoform;?>*
<input type="text" name="apellido" SIZE="12" MAXLENGTH="40">
<p><?php echo emailform;?>*
<input type="text" name="user_email" SIZE="15" MAXLENGTH="50">
</p>
<IFRAME SRC="contrato.txt" NAME="Zone1" HEIGHT="200" WIDTH="450">
Sorry, your browser doesn't support iframes.
</IFRAME><br>
<input type="checkbox" name="chk">Acepto las bases del contrato, y me
comprometo a cumplir con el.
<br>
<p> <?php echo nombredeusuarioform;?>*
<input type="text" name="username" SIZE="12" MAXLENGTH="20">
</p>
<p> <?php echo contrasenaform;?>*
<input type="password" name="user_password" SIZE="22" MAXLENGTH="30">
</p>
<input type="submit" name="BTN_ENVIAR" onClick="estado()" value="<?php
echo registrarmeform;?>">
<input type="reset" value="<?php echo reseteoform;?>">
</FORM>
</div>
</body>
</script>
<noscript>
<plaintext>
</html> |