
14/04/2013, 23:31
|
| | Fecha de Ingreso: agosto-2012 Ubicación: Barcelona
Mensajes: 243
Antigüedad: 12 años, 7 meses Puntos: 1 | |
Indicar que cosa se debe ingresar Hola,
Necesitaria que al registrarse un usuario, en el campo donde tenga que ingresar algo, le diga que cosa debe ingresar.
He probado con el alt pero no me funciona.
Adjunto programa.
<?php
include ('conexion.php');
$sentencia = "SELECT * FROM categorias order by categorias asc";
$query = mysql_query($sentencia);
$pregunta = "SELECT * FROM postal order by codigo asc";
$codigo = mysql_query($pregunta);
?>
<!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>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Registro_usuarios</title>
<style type="text/css">
</style>
</head>
<body>
<?php include("menuprincipal.php");?>
<form method="POST" action=""/>
<table id="regusuario">
<tr>
<td>
* Empresa:
</td>
<td>
<input type="name" name="empresa" alt="Recuerde que el nombre de la empresa es para entrar en su cuenta"/>
</td>
</tr>
<tr>
<td>
Cif:
</td>
<td>
<input type="text" name="cif" />
</td>
</tr>
<tr>
<td>
* Usuario:
</td>
<td>
<input type="text" name="usuario" />
</td>
</tr>
<tr>
<td>
* Contraseña:
</td>
<td>
<input type="password" name="passwd1" />
</td>
</tr>
<tr>
<td>
* Repetir Contraseña:
</td>
<td>
<input type="password" name="rpass" />
</td>
</tr>
<tr>
<td>
* Categorias:
</td>
<td>
<select name='categorias' size='0'>
<?php while($arreglo = mysql_fetch_array($query)){?>
<option value="<?php echo $arreglo['id']?>"><?php echo $arreglo['categorias']?></option>
<?php } ?>
</td>
</tr>
<tr>
<td>
Descripción:
</td>
<td>
<input type="text" size="32" value="" name="descripcion"/>
</td>
</tr>
<tr>
<td>
Dirección:
</td>
<td>
<input type="text" size="32" value="" name="direccion"/>
</td>
</tr>
<tr>
<td>
Codigo postal:
</td>
<td>
<select name='cod_postal' size='0'>
<?php while($busco = mysql_fetch_array($codigo)){?>
<option value="<?php echo $busco['codigo']?>"><?php echo $busco['codigo']?></option>
<?php } ?>
</td>
</tr>
<tr>
<td>
Población:
</td>
<td>
<input type="text" name="poblacion" alt="poblacion" />
</td>
</tr>
<tr>
<td>
Provincia:
</td>
<td>
<input type="text" name="provincia" />
</td>
</tr>
<tr>
<td>
Telefono:
</td>
<td>
<input type="text" name="telefono" />
</td>
</tr>
<tr>
<td>
Fax:
</td>
<td>
<input type="text" name="fax" />
</td>
</tr>
<tr>
<td>
Email:
</td>
<td>
<input type="text" name="mail" value="" />
</td>
</tr>
<tr>
<td>
Horario:
</td>
<td>
<input type="text" name="horario" />
<input type="hidden" name="$map_empresa" value = "images/mapasants.jpg"/>
<input type="hidden" name="$payimgprn" value = "no"/>
<input type="hidden" name="$imagenprin" value = "images/Sinimagen.jpg"/>
<input type="hidden" name="$paginaweb" value = "images/infoima.jpg"/>
</td>
</tr>
<th colspan="2">
<input type="checkbox" name="terminos" checked="checked" value="yes">
Acepto los
<a target="_blank" href="terminos.php">términos y condiciones</a>
de la inserción de anuncio
</th>
<tr>
<td>
<input type="submit" name="submit" value="Registrarse" />
</td>
<td>
<input type="reset"/>
</td>
</tr>
</table>
</form>
<?php
if(isset($_POST['submit'])){
if(!$correo=filter_input(INPUT_POST, 'mail', FILTER_VALIDATE_EMAIL)){
echo "<p style='color:red; position:relative; margin:-190px 400px 0px; font-size: 11px;'>Me estas tomando el pelo!</p>";
}else{
echo "";
include("registronew.php");
}
}
?>
</body>
</html>
En la espera
Gracias y saludos |