Bonjour, j'ai un petit problème, je voudrais envoyer un e-mail avec des informations entrées sur une autre page ...
Je vous est fait une archive .ZIP pour voir tous les fichiers conçernés

Mon errreur
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
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 41
Ma page te saisie
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<form method=post name=f2 onsubmit="return CheckContact();">
  <table align=center width=400>
    <caption align=center class=bh>&nbsp;
    </caption>
 
    <tr>
      <td><strong>Votre offre </strong></td>
      <td><input type=text name=oa class=InputField size=10 />
          <font class=TableData> &euro;</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>&nbsp;</td>
      <td><input type=submit name=s1 value="Faire mon offre" class=SubmitButton /></td>
    </tr>
  </table>
</form>

Ma page de traitement
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
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
<?
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");
?>