bericht verzonden melding 2 x
bericht is verzonden. dit is de variable 'contact_form1'. kan iemand mij inlichten hoe ik dit weg krijg.
Daarnaast nog een korte vraag, maar niet een pre want is zeker wel te vinden op het net.
ik lees 1 mysql veld in via een while functie dit moet toch simpeleren kunnen, want ik weet zelf namelijk al wel veld ik wil inlezen 0
bedankt.
Code (php)
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?
<link rel="stylesheet" href="css/stylelinks.css" type="text/css" media="screen, projection"/>
<p> </p>
<p> </p>
<p> </p>
<div align="center">
[code]<?php
$userName = $_POST{'userName'};
$userEmail = $_POST{'userEmail'};
$rep_email = $_POST{'rep_email'};
$userSubject = $_POST{'userSubject'};
$userWebsite = $_POST{'userWebsite'};
$userMessage = $_POST{'userMessage'};
$userFeedback = $_POST{'userFeedback'};
$user[1] = $userName;
$user[2] = '';
$email[1] = $userEmail;
$email[2] = '';
$senderName = $userName;
$senderEmail = $userEmail;
$senderMessage = $userMessage;
$senderWebsite = $userWebsite;
$senderSubject = $userSubject;
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderMessage = stripslashes($senderMessage);
$senderSubject = stripslashes($senderSubject);
// mailing
$mysqli = new mysqli($host, $username, $password, $database);
if (mysqli_connect_errno()) {
printf("<BR><BR><BR>Connect failed: %s\n", mysqli_connect_error());
exit();}
$query='SELECT * FROM website ORDER BY id DESC';
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
if($result->num_rows > 0)
{
while($row = $result->fetch_assoc())
{
$to=$row['naar'];
}}
mysqli_close($mysqli);
// $senderName = $senderEmail;
/* addbcc
*/
// $email[1] = $senderEmail;
// $user[1] = $senderName;
if($senderName != "" && $senderEmail != "" && $senderSubject != "" && $senderMessage != ""){
$fromname = "Website";
$subject = $userSubject;
$bodytext ='<html><p>
<table width="400" border="0" ><tr><td>
<style type="text/css"> <!-- .center2 { text-align: center; } --> </style></head><body class="center2"><ul>
<img src="http://www.msxflash.nl/plaatjes/wwwmsxflashlogocopy.png" /><table
width="943" height="339" border="0"
BACKGROUND="http://www.msxflash.nl/plaatjes/mail_bg_font.png" >
<br>'.$to.'<br> '.$fromname.'<br><BR>
<tr>
<td height="21"><b>'.contactform8.'</b></td>
<td>'.$userFeedback.'</td>
</tr>
<tr>
<td width="135 height = " height="21"29"><b>'.contactform1.'</b></td>
<td width="621">'.$userName.'</td>
</tr>
<tr>
<td height="21" heigt "25" ><b>'.contactform2.'</b></td>
<td>'.$userEmail.'</td>
</tr>
<tr>
<td height="21"><b>'.contactform4.'</b></td>
<td>'.$userSubject.'</td>
</tr>
<tr>
<td height ="21"><b>'.contactform5.'</b></td>
<td> <p><a href="'.$userWebsite.'">'.$userWebsite.'</a></p> </td>
</tr>
<tr>
<td height="219" valign=top><b>'.contactform6.'</b></td>
<td valign=top>'.$userMessage.$spamtotaal.'</td>
</tr>
</table>
<p class="center2">'.$contact_fromsend.'</p>
</body></html>
</td> </tr> </table>
<img src="http://www.*************.nl/voorkant.jpg" width="595"
height="278" />';
//$from = $userEmail;
$from = $to;
// $headers = "From: <".$from."> \r\n";
// $headers .= 'MIME-Version: 1.0' . "\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
include_once (DIR_FS_INFO.'smtp.php');
echo "<BR><BR><BR><BR><BR><BR>".contact_form1;
exit();
} else
{
// echo contact_form2;
}
$feedback_info="";
?>
</div>
>?
<link rel="stylesheet" href="css/stylelinks.css" type="text/css" media="screen, projection"/>
<p> </p>
<p> </p>
<p> </p>
<div align="center">
[code]<?php
$userName = $_POST{'userName'};
$userEmail = $_POST{'userEmail'};
$rep_email = $_POST{'rep_email'};
$userSubject = $_POST{'userSubject'};
$userWebsite = $_POST{'userWebsite'};
$userMessage = $_POST{'userMessage'};
$userFeedback = $_POST{'userFeedback'};
$user[1] = $userName;
$user[2] = '';
$email[1] = $userEmail;
$email[2] = '';
$senderName = $userName;
$senderEmail = $userEmail;
$senderMessage = $userMessage;
$senderWebsite = $userWebsite;
$senderSubject = $userSubject;
$senderName = stripslashes($senderName);
$senderEmail = stripslashes($senderEmail);
$senderMessage = stripslashes($senderMessage);
$senderSubject = stripslashes($senderSubject);
// mailing
$mysqli = new mysqli($host, $username, $password, $database);
if (mysqli_connect_errno()) {
printf("<BR><BR><BR>Connect failed: %s\n", mysqli_connect_error());
exit();}
$query='SELECT * FROM website ORDER BY id DESC';
$result = $mysqli->query($query) or die($mysqli->error.__LINE__);
if($result->num_rows > 0)
{
while($row = $result->fetch_assoc())
{
$to=$row['naar'];
}}
mysqli_close($mysqli);
// $senderName = $senderEmail;
/* addbcc
*/
// $email[1] = $senderEmail;
// $user[1] = $senderName;
if($senderName != "" && $senderEmail != "" && $senderSubject != "" && $senderMessage != ""){
$fromname = "Website";
$subject = $userSubject;
$bodytext ='<html><p>
<table width="400" border="0" ><tr><td>
<style type="text/css"> <!-- .center2 { text-align: center; } --> </style></head><body class="center2"><ul>
<img src="http://www.msxflash.nl/plaatjes/wwwmsxflashlogocopy.png" /><table
width="943" height="339" border="0"
BACKGROUND="http://www.msxflash.nl/plaatjes/mail_bg_font.png" >
<br>'.$to.'<br> '.$fromname.'<br><BR>
<tr>
<td height="21"><b>'.contactform8.'</b></td>
<td>'.$userFeedback.'</td>
</tr>
<tr>
<td width="135 height = " height="21"29"><b>'.contactform1.'</b></td>
<td width="621">'.$userName.'</td>
</tr>
<tr>
<td height="21" heigt "25" ><b>'.contactform2.'</b></td>
<td>'.$userEmail.'</td>
</tr>
<tr>
<td height="21"><b>'.contactform4.'</b></td>
<td>'.$userSubject.'</td>
</tr>
<tr>
<td height ="21"><b>'.contactform5.'</b></td>
<td> <p><a href="'.$userWebsite.'">'.$userWebsite.'</a></p> </td>
</tr>
<tr>
<td height="219" valign=top><b>'.contactform6.'</b></td>
<td valign=top>'.$userMessage.$spamtotaal.'</td>
</tr>
</table>
<p class="center2">'.$contact_fromsend.'</p>
</body></html>
</td> </tr> </table>
<img src="http://www.*************.nl/voorkant.jpg" width="595"
height="278" />';
//$from = $userEmail;
$from = $to;
// $headers = "From: <".$from."> \r\n";
// $headers .= 'MIME-Version: 1.0' . "\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
include_once (DIR_FS_INFO.'smtp.php');
echo "<BR><BR><BR><BR><BR><BR>".contact_form1;
exit();
} else
{
// echo contact_form2;
}
$feedback_info="";
?>
</div>
>?
Gewijzigd op 11/06/2015 00:13:11 door Space gremlin
Waar komt de melding: "bericht is verzonden" vandaan?
deze staat hier.
en naar mijn weten netjes in de lus.
de mail zelf krijg ik ook niet dubbel binnen, anders zou ik het daar nog zoeken.
regel 117
ik ben er al uit das wel heel toevallig.
de script van mijn heeft de identieke tekst. als de tekst die weer gegeven word.
als de smtp goed gaat.
dus opgelost. dan ga ik mijn tekst verwijderen.
Gewijzigd op 11/06/2015 00:30:05 door space gremlin
Maar om het korter te maken, er zijn meerdere wegen naar Rome..
Code (php)
Gewijzigd op 11/06/2015 00:31:45 door Johan K
jouw regel ga ik bestuderen.