Bonjour a tous,
Voila pour mon site internet j'ai un script pour une news letter, News Pro letter , je souhaiterai inserer des photos ou image dans le script mais je ne sais ni comment ni ou !
Pour info j'ai deja bidouillé le script pour qu'il arrive avec un affichage identique a min site internet
Si quelqu'un peux me renseigner d'avance merci
<?php
// ça, vous avez l'habitude je pense...
mysql_connect("mysql5-2", "nombase", "code base");
mysql_select_db("nombase");
if(isset($_POST['sujet']) AND isset($_POST['message']))
{
$message = '
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<style type="text/css">
<!--
/* CSS Document */
p{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size:12px;
color:#000000;
line-height: 18px;
padding: 3px;
}
.gras {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: 18px;
font-weight: bold;
color: #000000;
background-color: #FFFFFF;
}
.texte {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
line-height: normal;
font-weight: normal;
color: #000000;
text-decoration: none;
}
.navigation{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
background-color: #FF0000;
display: block;
padding: 8 px;
width: 140px;
}
.navigation:hover{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 16px;
font-style: normal;
font-weight: bold;
color: #FF0000;
text-decoration: none;
background-color: #FFFFFF;
display: block;
padding: 8 px;
width: 140px;
}
.Bandeau {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
font-style: normal;
font-weight: bold;
color: #FFFFFF;
background-color: #FF0000;
}
.Bandeau:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
font-style: normal;
font-weight: bold;
color: #FF0000;
background-color: #FFFFFF;
}
.navigationsoustitre{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: bold;
color: #FF0000;
text-decoration: none;
background-color: #FFFFFF;
display: block;
padding: 8 px;
width: 140px;
}
.navigationsoustitre:hover{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-style: normal;
font-weight: bold;
color: #FFFFFF;
text-decoration: none;
background-color: #FF0000;
display: block;
padding: 8 px;
width: 140px;
}.titrenews {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
line-height: 18px;
font-weight: bold;
color: #FFFFFF;
background-color: #FF0000;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Newsletter</title>
<style type="text/css">
<!--
.Style1 {color: #FF0000}
.Style2 {color: #FFFFFF}
-->
</style>
<link href="http://www.futsalcambrai.asso.fr/futsalcambrai.css" rel="stylesheet" type="text/css">
<link href="http://www.futsalcambrai.asso.fr/futsalcambrai.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.Style3 {font-size: 11px; font-style: normal; line-height: normal; color: #000000; text-decoration: none; font-family: Verdana, Arial, Helvetica, sans-serif;}
-->
</style>
</head>
<body>
<div align="center">
<table border="0" bordercolor="#ff0000" width="800">
<tbody>
<tr>
<td bgcolor="#ff0000" height="90">
<div class="Style2" align="right"><img src="http://www.futsalcambrai.asso.fr/images/Bandeau%20net.jpg" alt="" name="bandeau" id="bandeau" height="90" width="700"></div>
</td>
</tr>
</tbody>
</table>
<table bgcolor="#ff0000" border="0" width="800">
<tbody>
<tr>
<td height="24"><span class="Style1"></span></td>
</tr>
</tbody>
</table>
<table style="width: 798px; height: 520px;" border="0" bordercolor="#ff0000">
<tbody>
<tr>
<td width="140" height="405" align="center" valign="top" bgcolor="#ff0000">
<p align="left"><a href="http://www.futsalcambrai.asso.fr/index.php3" class="navigation">Accueil</a> <a href="http://www.futsalcambrai.asso.fr/leclub.html" class="navigation">Le club</a> <a href="http://www.futsalcambrai.asso.fr/competitions.html" class="navigation">Compétition</a> <a href="http://www.futsalcambrai.asso.fr/sponsors.html" class="navigation">Sponsors</a> <a href="http://www.futsalcambrai.asso.fr/Galerie.html" class="navigation">Galeries</a> <a href="http://www.futsalcambrai.asso.fr/Liens.html" class="navigation">Liens</a> <a href="http://www.futsalcambrai.asso.fr/MyNews1.2/News.php3" class="navigation">News</a> <a href="http://www.futsalcambrai.asso.fr/demande_inscription.php" class="navigation">Newsletter</a> <a href="http://www.futsalcambrai.asso.fr/formulaire.html" class="navigation">Contact</a> </p>
<p align="center"><img name="" src="http://www.futsalcambrai.asso.fr/images/logo2.jpg" alt="" height="117" width="120"></p>
<p> </p>
<p> </p></td>
<td width="650" align="center" valign="top"><div align="left">
' . $_POST['message'] . '
</div></td>
</tr>
</table>
<table width="800" border="0" bgcolor="#FF0000">
<tr>
<td height="24">Pour vous désabonner cliquez sur le lien <a href="http://www.futsalcambrai.asso.fr/inscription.asp?mail="&mail&"&abo=2">désabonnement</a>"</td>
</tr>
</table>
<table width="800" border="0">
<tr>
<td height="16"><div align="right" class="texte">Copyright cambraifutsal.asso.fr </div></td>
</tr>
</table>
</div>
</body>
</html>
';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$retour = mysql_query('SELECT mail FROM news'); // On sélectionne les adresses mail des membres
while ($donnees = mysql_fetch_array($retour))
{
mail($donnees['mail'], $_POST['sujet'], $message, $headers);
}
}
else // Sinon, si l'on a pas posté de newsletter on affiche le formulaire
{
?>
<form method="post">
<p>
Sujet :<input name="sujet" type="text" size="75" />
<br /><br />
Message<br />
<textarea rows="40" cols="100" name="message"></textarea>
<br />
<input type="submit" value="Envoyer" />
</p>
</form>
<?php
}
?>
<?
$query2 = "INSERT INTO letter(objet_newsletter,contenutext_newsletter,dateparution) VALUES('$sujet','$message','$date')";
?>