Probleme envoi de mail
Posté : 15 févr. 2008, 14:24
Bonjour, j'ai un petit problème, je voudrais envoyer un e-mail avec des informations entrées sur une autre page ...
http://www.sites-a-vendre.eu/Nouveau%20dossier.zip
Mon errreur
Ma page te saisie
Ma page de traitement
[/url]
http://www.sites-a-vendre.eu/Nouveau%20dossier.zip
Mon errreur
Code : Tout sélectionner
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/sites-a-vendre/public_html/offer.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at /home/sites-a-vendre/public_html/offer.php:11) in /home/sites-a-vendre/public_html/offer.php on line 41Code : Tout sélectionner
<form method=post name=f2 onsubmit="return CheckContact();">
<table align=center width=400>
<caption align=center class=bh>
</caption>
<tr>
<td><strong>Votre offre </strong></td>
<td><input type=text name=oa class=InputField size=10 />
<font class=TableData> €</font></td>
</tr>
<tr>
<td valign="top"><strong>Votre message</strong></td>
<td class=TableData><textarea name=m1 rows=5 cols=30 class=InputField></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type=submit name=s1 value="Faire mon offre" class=SubmitButton /></td>
</tr>
</table>
</form>Code : Tout sélectionner
<?
require_once("conn.php");
require_once("access.php");
if(isset($_POST[s1]))
{
$today=date("Y-m-d");
$sql="INSERT into domain_offer
set offeruserid='$_SESSION[MemberID]',
offeruname='$_SESSION[username]',
offerdomainid='$_GET[DomainID]',
offeramount='$_POST[oa]',
offtext='$_POST[m1]',
offdate='$today'";
@mysql_query($sql);
if(mysql_affected_rows()<1)
{
$sql="UPDATE domain_offer
set offeruname='$_SESSION[username]',
offeramount='$_POST[oa]',
offtext='$_POST[m1]',
offdate='$today'
where offeruserid='$_SESSION[MemberID]' and offerdomainid='$_GET[DomainID]'";
@mysql_query($sql);
}
$q1 = "select * from domain_domains, domain_members where domain_domains.domainid = '$_GET[DomainID]' and domain_domains.memberid = domain_members.memberid ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
$to = $a1[email];
$subject = "Nouvelle offre pour ".$a1[domainname];
$message = "Une nouvelle offre a été posté \n\n";
$message.= "$_POST[m1]\n\nMontant de l'offre: $_POST[oa]";
$headers = "MIME-Version: 1.0\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\n";
$headers .= "Content-Transfer-Encoding: 8bit\n";
$headers .= "From: $aset[ContactEmail]\n";
$headers .= "X-Priority: 1\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "X-Mailer: PHP/" . phpversion()."\n";
mail($to, $subject, $message, $headers);
header("location:offers.php?did=$_GET[DomainID]");
exit();
}
$q1 = "select * from domain_domains where domainid = '$_GET[DomainID]' ";
$r1 = mysql_query($q1) or die(mysql_error());
$a1 = mysql_fetch_array($r1);
$DomainName = $a1[domainname];
$DomainDescription = $a1[domaindescription];
require_once("templates/header.php");
require_once("templates/ContactOwnerTemplate.php");
require_once("templates/footer.php");
?>