Ver Mensaje Individual
  #1 (permalink)  
Antiguo 29/09/2010, 08:05
martines
 
Fecha de Ingreso: abril-2010
Mensajes: 76
Antigüedad: 14 años, 9 meses
Puntos: 0
Formulario campos obligatorios

Tengo un formulario integrado en la pagina web, funciona perfectament y sale todo bien. Aqui dejo las dos partes, en que parte tendria que poner para que me salgan campos obligatorios?

Código PHP:
<script type="text/javascript"><!--
function 
ChkFrm_8_00(oForm)
{
sAlert1 "Error en el dato ingresado! ";
sAlert2 "Direccion de email incorrecta! ";
return (
true);
}
//--></script>
<form action="files/mail_p006_8_00.php" method="post" onsubmit="return ChkFrm_8_00(this)">
<
fieldset>
<
div>
<
label for="Itm_8_00_1">
Nom:<br />
    <
input class="imInput imInput_0" type="text" name="Itm_8_00_1" id="Itm_8_00_1" />
</
label>
</
div>
<
div>
<
label for="Itm_8_00_2">
Correu electr&#243;nic:<br />
    
<input class="imInput imInput_0" type="text" name="Itm_8_00_2" id="Itm_8_00_2" />
</
label>
</
div>
<
div>
<
label for="Itm_8_00_3">
Tel&#232;fon:<br />
    
<input class="imInput imInput_0" type="text" name="Itm_8_00_3" id="Itm_8_00_3" />
</
label>
</
div>
<
div>
<
label for="Itm_8_00_4">
Comentari:<br />
    <
textarea class="imInput imInput_0" name="Itm_8_00_4" id="Itm_8_00_4" rows="10" cols="15" style="height: 190px; "></textarea>
</
label>
</
div>
<
div class="imAlign_center">
    <
input class="imFormButton" type="submit" value=" Enviar " />
    <
input class="imFormButton" type="reset" value=" Limpiar " />
</
div>
</
fieldset>
</
form>

    </
div>
</
div>
</
div>

</
div>
<
p id="imFooterSiteMap"><a href="index.html" title="">Inici</a> | <a href="on_estem.html" title="">On Estem</a> | <a href="la_nostra_seu.html" title="">La nostra seu</a> | <a href="objectius.html" title="">Objectius</a> | <a href="notes_de_premsa.html" title="">Notes de Premsa</a> | <a href="noves_generacions.html" title="">Noves Generacions</a> | <a href="donans_la_teva_opinio.html" title="">D&#243;na'ns la teva opinió</a> | <a href="imsitemap.html" title="Mapa del sitio General">Mapa del Sitio</a></p> 
Código PHP:
<?php
$Msg 
"\r\n\r\n";
$UserData "";
$UserData .= "Nom " $_POST["Itm_8_00_1"] . "\r\n";
$UserData .= "Correu electrónic " $_POST["Itm_8_00_2"] . "\r\n";
$UserData .= "Telèfon " $_POST["Itm_8_00_3"] . "\r\n";
$UserData .= "Comentari " $_POST["Itm_8_00_4"] . "\r\n";
mail"[email protected]"""$Msg $UserData"From: [email protected]\r\nContent-type: text/plain; charset=iso-8859-1\r\n");

$Msg "\r\n\r\n";
mail$_POST["Itm_8_00_5"], ""$Msg"From: [email protected]\r\nContent-type: text/plain; charset=iso-8859-1\r\n");

@
header("Location: ../index.html");
?>