Today i did an upgrade on facileforms and saved all my data i had in the form:
The first tab is the foto attached:
next, the HTML Tab:
The javascript:
the PHP - the on submit before
my template
Can u please tell me what is wrong? I get no mail, but also no error.
Post edited by: cleocadio, at: 2007/07/09 19:59
Post edited by: cleocadio, at: 2007/07/09 20:01<br><br>Post edited by: cleocadio, at: 2007/07/09 20:02
The first tab is the foto attached:
next, the HTML Tab:
Preencha o seguinte formulário para obter informação especifica. Verifique que os dados introduzidos estão correctos para ser contactado. <br> <br> <table> <tr> <td>Nome:</td> <td><input name="name" type="text" size="41" class="inputbox"></td> </tr> <tr> <td>Morada:</td> <td><input name="address" type="text" size="41" class="inputbox"></td> </tr> <tr> <td>Código Postal:</td> <td><input name="postal_code" type="text" size="20" class="inputbox"></td> </tr> <tr> <td>Telefone:</td> <td><input name="phone" type="text" size="20" class="inputbox"> *</td> </tr> <tr> <td>Telemóvel:</td> <td><input name="mobile" type="text" size="20" class="inputbox"></td> </tr> <tr> <tr> <td>Email:</td> <td><input name="email" type="text" size="20" class="inputbox"> *</td> </tr> <td>Informações:</td> <td> <select name="info" class="inputbox"> <option value ="comercial@virtual.pt">Desenvolvimento Web</option> <option value ="celia.leocadio@virtual.pt">Alojamento e DomÃnios</option> <option value ="comercial@virtual.pt">Segurança TI</option> <option value ="comercial@virtual.pt">Data Backups</option> <option value ="suporte@virtual.pt">Data Recovery</option> <option value ="comercial@virtual.pt">Gestão de Hardware</option> <option value ="comercial@virtual.pt">Gestão de Software</option> <option value ="comercial@virtual.pt">Vigilância</option> <option value ="comercial@virtual.pt">Servidores</option> <option value ="comercial@virtual.pt">Computadores</option> <option value ="comercial@virtual.pt">Comunicações</option> <option value ="comercial@virtual.pt">Redes</option> <option value ="comercial@virtual.pt">Retail Pro</option> <option value ="comercial@virtual.pt">Primavera</option> <option value ="comercial@virtual.pt">Winrest</option> <option value ="comercial@virtual.pt">Contratos de Assistência</option> <option value ="comercial@virtual.pt">Auditoria</option> <option value ="comercial@virtual.pt">Desenvolvimento</option> <option value ="suporte@virtual.pt">Suporte</option> <option value ="comercial@virtual.pt">Consultoria</option> <option value ="comercial@virtual.pt">Formação</option> <option value ="comercial@virtual.pt">Outsourcing</option> <option value ="suporte@virtual.pt">Centro de Reparações</option> <option value ="comercial@virtual.pt">Outros</option> </select> </td> </tr> <tr> <td>Mensagem:</td> <td> <textarea name="message" rows="4" class="inputbox"></textarea> </td> </tr> <tr> <td></td> <td><input value="Enviar Formulário" type="submit" class="button"></td> </tr> </table> *) campo obrigatório <br> <br>
The javascript:
function validate_required(field,alerttxt) {
with (field) {
if (value==null||value=="") {
alert(alerttxt);
return false
}
else {
return true
}
}
}
function validate_form(thisform) {
with (thisform) {
if (validate_required(phone,"Preencha o telefone por favor.")==false || validate_required(email,"Preencha o email por favor.")==false){
return false
}
}
}
with (field) {
if (value==null||value=="") {
alert(alerttxt);
return false
}
else {
return true
}
}
}
function validate_form(thisform) {
with (thisform) {
if (validate_required(phone,"Preencha o telefone por favor.")==false || validate_required(email,"Preencha o email por favor.")==false){
return false
}
}
}
the PHP - the on submit before
<?php
$body = "Nome: " . $_REQUEST['name'] . "\n" . "Morada: " . $_REQUEST['address'] . "\n" . "Código Postal: " . $_REQUEST['postal_code'] ."\n" . "Telefone: " . $_REQUEST['phone'] . "\n" . "Telemóvel: " . $_REQUEST['mobile'] . "\n" . "Email: " . $_REQUEST['email'] . "\n" . "Mensagem:\n\n" . $_REQUEST['message'];
if($_REQUEST['email'] == "" || $_REQUEST['phone'] == "") {
echo "Erro:<br>Por favor preencha o email e o telefone.";
} else {
mail($_REQUEST['info'], 'Informação', $body, "From:SITE_VIRTUAL");
echo "Mensagem enviada com sucesso.";
}
?>
$body = "Nome: " . $_REQUEST['name'] . "\n" . "Morada: " . $_REQUEST['address'] . "\n" . "Código Postal: " . $_REQUEST['postal_code'] ."\n" . "Telefone: " . $_REQUEST['phone'] . "\n" . "Telemóvel: " . $_REQUEST['mobile'] . "\n" . "Email: " . $_REQUEST['email'] . "\n" . "Mensagem:\n\n" . $_REQUEST['message'];
if($_REQUEST['email'] == "" || $_REQUEST['phone'] == "") {
echo "Erro:<br>Por favor preencha o email e o telefone.";
} else {
mail($_REQUEST['info'], 'Informação', $body, "From:SITE_VIRTUAL");
echo "Mensagem enviada com sucesso.";
}
?>
my template
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> <style type="text/css"> <!-- body, html{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size:11px; margin:auto; } .table_form { padding:0px; text-align:left; border: 1px solid #CDCDCD; } .hh5{ font-size: 12px;color:#CC3333; background-color: #eee;} .tables{ background-color: #f6f6f6; border-bottom: 1px solid #e4e4e4; border-top: 1px solid #eDeDeD; padding:5px; margin-top: 5px; margin-bottom: 5px; font-size: 10px; color: #3399cc; font-weight:bold; } .tables2{ background-color: #FEFEFE;; border-bottom: 1px solid #e4e4e4; border-top: 1px solid #eDeDeD; padding:3px; margin-top: 5px; margin-bottom: 5px; font-size: 10px; color: #888; } --> </style> </head> <body> <p> </p> <table width="60%" border="0" align="center" cellpadding="5" class="table_form"> <tr> <td width="33%" class="tables">Nome: </td> <td width="67%" class="tables2">{name}</td> </tr> <tr> <td class="tables"> Morada: </td> <td class="tables2"> {address} </td> </tr> <tr> <td class="tables"> Código Postal: </td> <td class="tables2"> {postal_code} </td> </tr> <tr> <td class="tables"> Telefone: </td> <td class="tables2"> {phone} </td> </tr> <tr> <td class="tables"> Telemóvel: </td> <td class="tables2"> {mobile} </td> </tr><tr> <td class="tables"> Email: </td> <td class="tables2"> {email} </td> </tr> <td class="tables"> Informações: </td> <td class="tables2"> {info} </td> </tr> <tr> <td class="tables"> Mensagem: </td> <td class="tables2"> {message} </td> </tr> </table> </body> </html>
Can u please tell me what is wrong? I get no mail, but also no error.
Post edited by: cleocadio, at: 2007/07/09 19:59
Post edited by: cleocadio, at: 2007/07/09 20:01<br><br>Post edited by: cleocadio, at: 2007/07/09 20:02