Bonjour, a la base je suis realisateur video 3D relief, mais en piochant des ressources ici et la, j'arrive a pouvoir monter mon site, cette semaine j'ai fait un upgrade, tout allais bien sauf pour une petit detail , j'ai utilise un form mail php trouve sur le web, je suis arrive a le mettre en page, sauf a la fin, car si le formulaire est rempli correctement j'ai le tableau des bouton avec les liens qui s'affiche a la bonne place apres le message d'envoi correct du message, mais des que le formulaire est mal rempl il envoi vers un message d'erreur et la le tableau avec les butons s'affiche pas. je fais un copier coller de mon formulaire pour si quelqu'un peut m'aider.
La partie un rouge c'est le code du tableau avec les butons
Merci d'avance
Francisco Coloma
http://www.3datelier.fr
<body>
<div align="center">
<div class="ombrage1" id="content" style="background-image: url(images/fond_contact.png)" >
<table width="624" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="624">
<table width="624" height="350" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<td valign="top"><p align="justify"><span class="style4">CONTAC</span>
<table width="624px" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" >
<tr>
<td>
<p align="center" class="style1">
<?php
if(isset($_POST['email'])) {
// EDIT THE 2 LINES BELOW AS REQUIRED
$email_to = "[email protected]";
$email_subject = "message 3datelier";
function died($error) {
// your error code can go here
echo "Nous sommes désolés, mais il y a des erreurs dans le formulaire rempli. ";
echo "Les erreurs sont les suivantes.<br /><br />";
echo $error."<br /><br />";
echo "S'il vous plait revenez et corrigez ces erreurs.<br /><br />";
die();
}
// validation expected data exists
if(!isset($_POST['first_name']) ||
!isset($_POST['last_name']) ||
!isset($_POST['email']) ||
!isset($_POST['telephone']) ||
!isset($_POST['comments'])) {
died('nous sommes désolés, mais il y a des problèmes avec le formulaire');
}
$first_name = $_POST['first_name']; // required
$last_name = $_POST['last_name']; // required
$email_from = $_POST['email']; // required
$telephone = $_POST['telephone']; // not required
$comments = $_POST['comments']; // required
$error_message = "";
$email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
if(!preg_match($email_exp,$email_from)) {
$error_message .= 'Votre adresse email ne semble pas valide .<br />';
}
$string_exp = "/^[A-Za-z .'-]+$/";
if(!preg_match($string_exp,$first_name)) {
$error_message .= 'Votre prénom ne semble pas valide.<br />';
}
if(!preg_match($string_exp,$last_name)) {
$error_message .= 'Votre nom de famille ne semble pas valide.<br />';
}
if(strlen($comments) < 2) {
$error_message .= 'Votre commentaire ne semble pas valide.<br />';
}
if(strlen($error_message) > 0) {
died($error_message);
}
$email_message = "Form details below.\n\n";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "First Name: ".clean_string($first_name)."\n";
$email_message .= "Last Name: ".clean_string($last_name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Telephone: ".clean_string($telephone)."\n";
$email_message .= "Comments: ".clean_string($comments)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
?>
<!-- include your own success html here -->
<p> </p>
<p> </p>
<div align="center"><span class="style1">Merci de votre message nous vous repondrons très rapidement </span>
<?php
}
?>
</p>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table width="627" border="0" cellspacing="3" cellpadding="0">
<tr>
<td width="101" ><a href="home.html">
<TABLE class=" FCK__ShowTableBorders" height=95 cellSpacing=1 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><IMG onmouseover="this.src='images/botones/home_over.png'" onmouseout="this.src='images/botones/home.png'" src="images/botones/home.png"></TD>
</TR>
</TBODY>
</TABLE>
</a>
</td>
<td width="101">
<a href="tournage.html">
<IMG style="DISPLAY: none"src="images/botones/tournage.png">
<TABLE class=" FCK__ShowTableBorders" height=95 cellSpacing=1 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><IMG src="images/botones/tournage.png" onmouseover="this.src='images/botones/tournage_over.png'" onmouseout="this.src='images/botones/tournage.png'"></TD>
</TR>
</TBODY>
</TABLE>
</a>
</td>
<td width="101">
<a href="creation.html">
<IMG style="DISPLAY: none"src="images/botones/creation.png">
<TABLE class=" FCK__ShowTableBorders" height=95 cellSpacing=1 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><IMG src="images/botones/creation.png" onmouseover="this.src='images/botones/creation_over.png'" onmouseout="this.src='images/botones/creation.png'"></TD>
</TR>
</TBODY>
</TABLE>
</a></td>
<td width="101">
<a href="projections.html">
<IMG style="DISPLAY: none"src="images/botones/projections.png">
<TABLE class=" FCK__ShowTableBorders" height=95 cellSpacing=1 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><IMG src="images/botones/projections.png" onmouseover="this.src='images/botones/projections_over.png'" onmouseout="this.src='images/botones/projections.png'"></TD>
</TR>
</TBODY>
</TABLE>
</a>
</td>
<td width="101">
<a href="videos.html">
<IMG style="DISPLAY: none"src="images/botones/video.png">
<TABLE class=" FCK__ShowTableBorders" height=95 cellSpacing=1 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><IMG src="images/botones/video.png" onmouseover="this.src='images/botones/video_over.png'" onmouseout="this.src='images/botones/video.png'"></TD>
</TR>
</TBODY>
</TABLE>
</a>
</td>
<td width="101">
<a href="contact.html">
<IMG style="DISPLAY: none"src="images/botones/contact.png">
<TABLE class=" FCK__ShowTableBorders" height=95 cellSpacing=1 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><IMG src="images/botones/contact.png" onmouseover="this.src='images/botones/contact_over.png'" onmouseout="this.src='images/botones/contact.png'"></TD>
</TR>
</TBODY>
</TABLE>
</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
</div>
</body>