Miren mi codigo en html de registro es
*****************************************************************
<?php require_once('Connections/klanbas.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) {
$insertSQL = sprintf("INSERT INTO comuna (usuario, password, email, nombre, apellido, pais, provincia, distrito, telefono, direccion, fecha_naci) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['usuario'], "text"),
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['email'], "text"),
GetSQLValueString($_POST['nombre'], "text"),
GetSQLValueString($_POST['apellido'], "text"),
GetSQLValueString($_POST['pais'], "text"),
GetSQLValueString($_POST['provincia'], "text"),
GetSQLValueString($_POST['distrito'], "text"),
GetSQLValueString($_POST['telefono'], "int"),
GetSQLValueString($_POST['direccion'], "text"),
GetSQLValueString($_POST['fecha_naci'], "text"));
mysql_select_db($database_klanbas, $klanbas);
$Result1 = mysql_query($insertSQL, $klanbas) or die(mysql_error());
$insertGoTo = "registrado.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
mysql_select_db($database_klanbas, $klanbas);
$query_Paises = "SELECT * FROM pais ORDER BY pais ASC";
$Paises = mysql_query($query_Paises, $klanbas) or die(mysql_error());
$row_Paises = mysql_fetch_assoc($Paises);
$totalRows_Paises = mysql_num_rows($Paises);
$colname_Provincias = "-1";
if (isset($_POST['id_pais'])) {
$colname_Provincias = $_POST['id_pais'];
}
mysql_select_db($database_klanbas, $klanbas);
$query_Provincias = sprintf("SELECT id_provincia, provincia FROM provincia WHERE id_pais = %s ORDER BY provincia ASC", GetSQLValueString($colname_Provincias, "text"));
$Provincias = mysql_query($query_Provincias, $klanbas) or die(mysql_error());
$row_Provincias = mysql_fetch_assoc($Provincias);
$totalRows_Provincias = mysql_num_rows($Provincias);
$colname_Distritos = "-1";
if (isset($_POST['id_provincia'])) {
$colname_Distritos = $_POST['id_provincia'];
}
mysql_select_db($database_klanbas, $klanbas);
$query_Distritos = sprintf("SELECT id_distrito, distrito FROM distrito WHERE id_provincia = %s ORDER BY distrito ASC", GetSQLValueString($colname_Distritos, "text"));
$Distritos = mysql_query($query_Distritos, $klanbas) or die(mysql_error());
$row_Distritos = mysql_fetch_assoc($Distritos);
$totalRows_Distritos = mysql_num_rows($Distritos);
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sin título</title>
<style type="text/css">
<!--
body {
background-color: #000000;
}
.Estilo1 {
font-family: "Courier New", Courier, monospace;
color: #006699;
font-weight: bold;
}
.Estilo3 {
color: #FFFFFF;
font-family: "Courier New", Courier, monospace;
font-size: 12px;
}
.Estilo6 {color: #006699; font-family: "Courier New", Courier, monospace; }
-->
</style></head>
<body>
<div align="center"><img src="img/img_regis.png" width="472" height="59" /></div>
<form id="form1" name="form1" method="post" action="">
<table width="362" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td height="22" colspan="2"><img src="img/img_ubi.jpg" width="390" height="27" /></td>
</tr>
<tr>
<td width="246" height="22"><div align="left"><span class="Estilo1">Lugar en donde vives:</span></div></td>
<td width="141"><label>
<div align="left">
<select name="id_pais" id="id_pais" onchange="submit()">
<option value="" <?php if (!(strcmp("", $_POST['id_pais']))) {echo "selected=\"selected\"";} ?>>Seleccionar</option>
<?php
do {
?>
<option value="<?php echo $row_Paises['id_pais']?>"<?php if (!(strcmp($row_Paises['id_pais'], $_POST['id_pais']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Paises['pais']?></option>
<?php
} while ($row_Paises = mysql_fetch_assoc($Paises));
$rows = mysql_num_rows($Paises);
if($rows > 0) {
mysql_data_seek($Paises, 0);
$row_Paises = mysql_fetch_assoc($Paises);
}
?>
</select>
</div>
</label></td>
</tr>
<tr>
<td><div align="left" class="Estilo6">(*)</div></td>
<td><label>
<div align="left">
<select name="id_provincia" id="id_provincia" onchange="submit()">
<option value="" <?php if (!(strcmp("", $_POST['id_provincia']))) {echo "selected=\"selected\"";} ?>>Seleccionar</option>
<?php
do {
?>
<option value="<?php echo $row_Provincias['id_provincia']?>"<?php if (!(strcmp($row_Provincias['id_provincia'], $_POST['id_provincia']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Provincias['provincia']?></option>
<?php
} while ($row_Provincias = mysql_fetch_assoc($Provincias));
$rows = mysql_num_rows($Provincias);
if($rows > 0) {
mysql_data_seek($Provincias, 0);
$row_Provincias = mysql_fetch_assoc($Provincias);
}
?>
</select>
</div>
</label></td>
</tr>
<tr>
<td><div align="left"></div></td>
<td><label>
<div align="left">
<select name="id_distrito" id="id_distrito" onchange="submit()">
<option value="" <?php if (!(strcmp("", $_POST['id_distrito']))) {echo "selected=\"selected\"";} ?>>Seleccionar</option>
<?php
do {
?>
<option value="<?php echo $row_Distritos['id_distrito']?>"<?php if (!(strcmp($row_Distritos['id_distrito'], $_POST['id_distrito']))) {echo "selected=\"selected\"";} ?>><?php echo $row_Distritos['distrito']?></option>
<?php
} while ($row_Distritos = mysql_fetch_assoc($Distritos));
$rows = mysql_num_rows($Distritos);
if($rows > 0) {
mysql_data_seek($Distritos, 0);
$row_Distritos = mysql_fetch_assoc($Distritos);
}
?>
</select>
</div>
</label></td>
</tr>
</table>
</form>
<form id="form2" name="form2" method="POST" action="<?php echo $editFormAction; ?>">
<table width="396" border="0" align="center" cellpadding="1" cellspacing="1">
<tr>
<td colspan="2"><img src="img/img_gen.jpg" alt="" width="390" height="27" /></td>
</tr>
<tr>
<td width="243"><div align="left"><span class="Estilo6">Usuario(*):</span></div></td>
<td width="146"><label>
<div align="left">
<input type="text" name="usuario" id="usuario" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Password</span><span class="Estilo6">(*):</span></div></td>
<td><label>
<div align="left">
<input type="password" name="password" id="password" />
</label>
</div></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Re-Password</span><span class="Estilo6">(*):</span></div></td>
<td><label>
<div align="left">
<input type="text" name="repass" id="repass" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Email(*):</span></div></td>
<td><label>
<div align="left">
<input type="text" name="email" id="email" />
</label>
</div></td>
</tr>
<tr>
<td> </td>
<td><div align="left"></div></td>
</tr>
<tr>
<td colspan="2"><img src="img/img_perso.jpg" width="390" height="27" /></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Nombre(*):</span></div></td>
<td><label>
<div align="left">
<input type="text" name="nombre" id="nombre" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Apellido(*):</span></div></td>
<td><label>
<div align="left">
<input type="text" name="apellido" id="apellido" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Fecha de nacimiento(*):</span></div></td>
<td><label>
<div align="left">
<input type="text" name="fecha_naci" id="fecha_naci" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Telefono:</span></div></td>
<td><label>
<div align="left">
<input type="text" name="telefono" id="telefono" />
</div>
</label></td>
</tr>
<tr>
<td><div align="left"><span class="Estilo6">Direcion:</span></div></td>
<td><label>
<div align="left">
<input type="text" name="direccion" id="direccion" />
</div>
</label></td>
</tr>
</table>
<p>
<input name="pais" type="hidden" id="pais" value="<?php echo $_POST['id_pais'];?>" />
<input name="provincia" type="hidden" id="provincia" value="<?php echo $_POST['id_provincia'];?>" />
<input name="distrito" type="hidden" id="distrito" value="<?php echo $_POST['id_distrito'];?>" />
</p>
<p align="center">
<input type="submit" name="button" id="button" value="Enviar" /></p>
<label></label>
<input type="hidden" name="MM_insert" value="form2" />
</form>
<p align="center" class="Estilo3">(*)Obligatorio escribir, Registrate comenzando con el lugar donde vives luego rellenar el resto</p>
</body>
</html>
<?php
mysql_free_result($Paises);
mysql_free_result($Provincias);
mysql_free_result($Distritos);
?>
*****************************************************************
lo q kisiera saber es como y donde pongo los php para q me salga un mensaje si digamos e hecho diferente las contraseña en los dos campos uno es password(q es el oficial) y el otro es repass........ayudenme a modificar estos codigos