1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
| <?php
include("sources/config.php");
// Verifie si on peut se connecter a la base sql
$connect=mysql_connect($host,$user,$pass) or die ("Impossible de se connecter");
mysql_select_db($base, $connect) or die ("Impossible de selectionner la base de donnees");
if($action == "verif")
{
$nom = $HTTP_POST_VARS["nom"];
$email = $HTTP_POST_VARS["email"];
$nom = strip_tags($nom);
$email = strip_tags($email);
if(!ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $mail))
{
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL = ?msg=Adresse+email+invalide+!\">";
exit;
}
//Recupere le nombre de messages au total
$result=mysql_query ("SELECT * FROM email") or die ("Requete impossible");
//Affichage des details du membres
($row = mysql_fetch_array($result));
$mail = $row["email"];
$requetem = mysql_db_query($base,"SELECT * FROM email WHERE email='$mail'",$db) or die(mysql_error());
$numm = mysql_num_rows($requetem);
$date = date("d/m/Y");
$sendto = "$mail";
$subject = "$sujet";
$body = "$message";
$from = "$email";
mail($sendto,$subject,$body,$from);
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL = index.php?msg=Message+envoyé!\">";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php echo $url ?> - Indentification !</title>
<link href="design.css" rel="stylesheet" type="text/css">
</head>
<body>
<p> </p>
<p> </p>
<form action="?action=verif" method="post" name="inscription" id="inscription">
<table width="28%" height="57" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="19"><img src="images/haut_identification.gif" width="308" height="26"></td>
</tr>
<tr>
<td height="176" background="images/milieu_identification.gif"><table width="39%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td class="Style1">Sujet :</td>
</tr>
<tr>
<td><input type="text" class="txt_box" name="sujet"></td></tr>
<tr>
<td class="Style1">Votre message :</td>
</tr>
<tr>
<td><textarea name="message" cols="44" rows="7" class="txt_box" ></textarea>
</td>
</tr>
</tr>
</tr>
</table>
<table width="100%" border="0">
<tr>
<td>
<center><input type="submit" name="Submit" class="txt_box" value="Envoyer"></center>
</td>
</tr>
</table><tr>
<td background="images/identification_tranparence.gif"><img src="images/identification.gif" width="308" height="131"></td>
</tr>
</td>
</tr>
</table>
</form> |