g trouvé un exemple de formulaire sur ce forum, je l'ai contruit à ma convenance, mais le pb maintenant c'est que le server me dis erreur à la ligne 111: Vous trouvez l'erreur ? ou ce cache t'elle ?
<?php
function affiche()
{
?>
<HTML>
<head>
<title>Liste de server</title>
<meta name="generator" content="Namo WebEditor v5.0">
</head>
<body bgcolor="#9F0101" text="black">
<form name="form" method="post" action="dd.php">
<table border="1" width="984" cellspacing="0" bordercolordark="white" bordercolorlight="black">
<tr>
<td width="144"> <p><font face="Verdana" color="white"><span style="font-size:10pt;">Pseudo :<br></span></font></td>
<td width="271"> <p><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="text" name="nom" size="20" style="font-size: 8 pt; font-family: Verdana; background-color: #FFFFFF; color: #000000; border: 0 solid #FFFFFF"></span></font></td>
<td width="547">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Entre ici ton Pseudo</span></font></p>
</td>
</tr>
<tr>
<td width="144"><p><font face="Verdana" color="white"><span style="font-size:10pt;">Adresse IP :</span></font></td>
<td width="271"><p><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="text" name="ip" size="20" style="font-size: 8 pt; font-family: Verdana; background-color: #FFFFFF; color: #000000; border: 0 solid #FFFFFF"></span></font></td>
<td width="547">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Ton adresse IP (pour connaitre ton ip, tape IPCONFIG dans
une fenêtre Ms-Dos)</span></font></p>
</td>
</tr>
<tr>
<td width="144"><p><font face="Verdana" color="white"><span style="font-size:10pt;">Maps:</span></font></td>
<td width="271"><p><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="text" name="maps" size="20" style="font-size: 8 pt; font-family: Verdana; background-color: #FFFFFF; color: #000000; border: 0 solid #FFFFFF"></span></font></td>
<td width="547">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Nom de la carte que le serveur Host</span></font></p>
</td>
</tr>
<tr>
<td width="144" height="23"><p><font face="Verdana" color="white"><span style="font-size:10pt;">Temps du server:</span></font></td>
<td width="271" height="23"><p><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="text" name="temps" size="20" style="font-size: 8 pt; font-family: Verdana; background-color: #FFFFFF; color: #000000; border: 0 solid #FFFFFF"></span></font></td>
<td width="547" height="23">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Entre ici l'heure jusque la quelle tu vas Hosté</span></font></p>
</td>
</tr>
<tr>
<td width="144" height="23"><p><font face="Verdana" color="white"><span style="font-size:10pt;">Type de connexion</span></font></td>
<td width="271" height="23"><p><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="text" name="adsl" size="20" style="font-size: 8 pt; font-family: Verdana; background-color: #FFFFFF; color: #000000; border: 0 solid #FFFFFF"></span></font></td>
<td width="547" height="23">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- ADSL 128 - ADSL 512 - ADSL 1024 - (pas de 56k merci)</span></font></p>
</td>
</tr>
<tr>
<td width="144" height="22"><p><font face="Verdana" color="white"><span style="font-size:10pt;">E-mail :</span></font></td>
<td width="271" height="22"><p><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="text" name="mail" size="20" style="font-size: 8 pt; font-family: Verdana; background-color: #FFFFFF; color: #000000; border: 0 solid #FFFFFF"></span></font></td>
<td width="547" height="22">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Ton mail pour te joindre en cas de probème</span></font></p>
</td>
</tr>
<tr>
<td width="144" height="16"><p><font face="Verdana" color="white"><span style="font-size:10pt;">Message :</span></font></td>
<td width="271" height="16"><p><font face="Verdana" color="white"><span style="font-size:10pt;"><textarea rows="6" name="message" cols="35" style="background-color: #FFFFFF; color: #000000; font-family: Verdana; font-size: 8 pt; border: 0 solid #FFFFFF"></textarea></span></font></td>
<td width="547" height="16">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Entre ici un petit message de ton choix</span></font></p>
</td>
</tr>
<tr>
<td width="144" height="36">
<p><font face="Verdana" color="white"><span style="font-size:10pt;"> </span></font></p>
</td>
<td width="271" height="36"><p align="center"><font face="Verdana" color="white"><span style="font-size:10pt;"><input type="submit" value="Valider" name="submit" style="color: #FFFFFF; font-family: Verdana; font-size: 8 pt; background-color: #0066CC; border: 1 ridge #0066CC"></span></font></td>
<td width="547" height="36">
<p><font face="Verdana" color="white"><span style="font-size:10pt;">- Valide ici après avoir complété tout les champs.</span></font></p>
</td>
</tr>
</table>
</form>
<font face="Verdana" color="white"><span style="font-size:10pt;"><?php
}
function ok()
{
?>
<br>
</span></font><center><font face="Verdana" color="white"><span style="font-size:10pt;">Merci, votre message a bien été envoyé!</span></font></center>
</body>
</HTML>
<?php
}
if(isset($submit)):
if($nom=="" ):
echo "<center><b><font face=\"Verdana\" size=\"1\">Veuillez préciser votre nom! <a href=\"javascript:history.back(1)\"> Cliquez ici pour retourner</a></font></b></center>";
elseif($ip=="" ):
echo "<center><b><font face=\"Verdana\" size=\"1\">Veuillez préciser votre email! <a href=\"javascript:history.back(1)\"> Cliquez ici pour retourner</a></font></b></center>";
elseif($nom=="" ):
echo "<center><b><font face=\"Verdana\" size=\"1\">Veuillez indiquer le contenu du message! <a href=\"javascript:history.back(1)\"> Cliquez ici pour retourner</a></font></b></center>";
elseif(strlen($message)>200):
echo "<center><b><font face=\"Verdana\" size=\"1\">Votre message est trop long! La longueur maximale est de 200 caractères<a href=\"javascript:history.back(1)\"> Cliquez ici pour retourner</a></font></b></center>";
elseif(strlen($nom)>50):
echo "<center><b><font face=\"Verdana\" size=\"1\">Votre nom est trop long! La longueur maximale est de 50 caractères<a href=\"javascript:history.back(1)\"> Cliquez ici pour retourner</a></font></b></center>";
elseif(strlen($mail)>50):
echo "<center><b><font face=\"Verdana\" size=\"1\">Votre email est trop long! La longueur maximale est de 50 caractères<a href=\"javascript:history.back(1)\"> Cliquez ici pour retourner</a></font></b></center>";
else:
$fichier = fopen("message.htm", "w" );
$message = stripslashes($message);
$message = trim($message);
$nom = stripslashes($nom);
$nom = trim($nom);
fwrite($fichier, "<html><body bgcolor=\"#0066CC\" text=\"#FFFFFF\">" );
fwrite($fichier, "<table align="center" border="1" width="534">" );
fwrite($fichier, "<tr>" );
fwrite($fichier, " <td width="151">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Pseudo</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;">".$nom."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, " <tr>" );
fwrite($fichier, " <td width="151">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Adresse ip du server</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;">".$ip."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, " <tr>" );
fwrite($fichier, " <td width="151">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Nom de la carte</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;">".$maps."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, " <tr>" );
fwrite($fichier, " <td width="151">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Server online jusque</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;">".$temps."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, " <tr>" );
fwrite($fichier, " <td width="151" height="21">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Type de connexion</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367" height="21">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;">".$adsl."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, " <tr>" );
fwrite($fichier, " <td width="151" height="53">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Message</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367" height="53">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;">".$message."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, " <tr>" );
fwrite($fichier, " <td width="151" height="12">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:10pt;">Server Hosté par</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " <td width="367" height="12">" );
fwrite($fichier, " <p><font face="Verdana"><span style="font-size:14pt;"><a href=\"mailto:".$mail."\"</a>".$nom."</span></font></p>" );
fwrite($fichier, " </td>" );
fwrite($fichier, " </tr>" );
fwrite($fichier, "</table>" );
fwrite($fichier, "<p> </p>" );
fwrite($fichier, "</body>" );
fwrite($fichier, "</html>" );
fclose($fichier);
ok();
endif;
else:
affiche();
endif;
?>