send email met account info in een echo
heb nu dit :
[script]
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
<?php $valuecredits = $account['credits'];
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subject mail';
$body = ' echo $account['customers_id']; got ..... ! mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subject mail';
$body = ' echo $account['customers_id']; got ..... ! mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
[/script]
Gewijzigd op 28/11/2011 11:12:26 door Kzip verhje
Echo gebruik je alleen als je iets direct op het scherm wilt tonen, en dat is niet van toepassing op mail().
Gewijzigd op 28/11/2011 11:33:57 door - Ariën -
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
<?php $valuecredits = $account['credits'];
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
nog een vraag hoe doe ik een db update als de mail is verzonden ?
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php $valuecredits = $account['credits'];
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>
tep_db_query("update " . TABLE_CUSTOMERS . " SET credits_send=credits+1 WHERE customers_id='".mysql_real_escape_string($account['customers_id']). "'");
');
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>
tep_db_query("update " . TABLE_CUSTOMERS . " SET credits_send=credits+1 WHERE customers_id='".mysql_real_escape_string($account['customers_id']). "'");
');
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
Gewijzigd op 28/11/2011 11:47:06 door kzip verhje
krijg : Parse error: syntax error, unexpected '"' in /home/account.php on line 107
107: tep_db_query("UPDATE " . TABLE_CUSTOMERS . " SET credits_send=credits+1 WHERE customers_id='".mysql_real_escape_string($account['customers_id']). "'");
ik zie het echt niet heb alle " vervagen met ' maar dat is het ook niet
En wat doet de code in lijn 10?
Gewijzigd op 28/11/2011 12:07:10 door - Ariën -
Code (php)
1
echo('<p>your request has been sent! </p> tep_db_query("update " . TABLE_CUSTOMERS . " SET credits=credits+1 WHERE customers_id='".mysql_real_escape_string($_COOKIE['credits_id']). "'"); ');
Gewijzigd op 28/11/2011 12:10:56 door kzip verhje
Jij laat nu je query zien, maar nogmaals, het gaat om de echo.. die eindigt nergens.
Lijn 10 is ook dus onzin.
Gewijzigd op 28/11/2011 12:11:03 door - Ariën -
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php $valuecredits = $account['credits'];
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
tep_db_query("update " . TABLE_CUSTOMERS . " SET credits=credits+1 WHERE customers_id='".mysql_real_escape_string($_COOKIE['credits_id']). "'");
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
if ( $valuecredits >= "10" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
tep_db_query("update " . TABLE_CUSTOMERS . " SET credits=credits+1 WHERE customers_id='".mysql_real_escape_string($_COOKIE['credits_id']). "'");
} else {
echo('<p>Message delivery failed...</p>');
}
}
?>
dan denk ik er temoelijk over (palm face)
Denk ook eens na over een PHP-tutorial, gezien dit best basic-fouten zijn.
En zie mijn PM over je andere topic.
Gewijzigd op 28/11/2011 12:19:32 door - Ariën -
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php $valuecredits = $account['credits'];
if ( $valuecredits >= "10" ) {
$valuecredits_send = $account['credits'];
if ( $valuecredits_send == "0" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
tep_db_query("UPDATE " . TABLE_CUSTOMERS . " SET credits_send=credits+1 WHERE customers_id='".mysql_real_escape_string($account['customers_id']). "'");
} else {
echo('<p>Message delivery failed...</p>');
}
}
$valuecredits_send = $account['credits_send'];
if ( $valuecredits_send >= "1" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>
Your request is already send "; $account['credits_id'];
}
}
?>
if ( $valuecredits >= "10" ) {
$valuecredits_send = $account['credits'];
if ( $valuecredits_send == "0" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>";
$to = '[email protected]';
$subject = 'subjje';
$body = $account['customers_id'].' got ..... mail';
if (mail($to, $subject, $body)) {
echo('<p>your request has been sent! </p>');
tep_db_query("UPDATE " . TABLE_CUSTOMERS . " SET credits_send=credits+1 WHERE customers_id='".mysql_real_escape_string($account['customers_id']). "'");
} else {
echo('<p>Message delivery failed...</p>');
}
}
$valuecredits_send = $account['credits_send'];
if ( $valuecredits_send >= "1" ) {
echo "<img src='pbar/100.png' width='700' height='61' /><br><br>
Your request is already send "; $account['credits_id'];
}
}
?>
Gewijzigd op 28/11/2011 12:31:50 door kzip verhje