Massa bericht fout?

Gestart doorMikeb11 reacties20 weergaven

12 berichten · pagina 1 van 1

Mikeb

Lid · Topicstarter

Berichten
6.356
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Heey Allemaal,
I wil een massa bericht versturen maar krijg deze fouten:
Warning: mysql_query() [function.mysql-query]: Access denied for user apache@localhost (using password: NO) in /home/dutchlea/domains/verdiendutchleaders.v3host.nl/public_html/nederlands/admin/contact_mass_email.php on line 4

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/dutchlea/domains/verdiendutchleaders.v3host.nl/public_html/nederlands/admin/contact_mass_email.php on line 4

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/dutchlea/domains/verdiendutchleaders.v3host.nl/public_html/nederlands/admin/contact_mass_email.php on line 5

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home/dutchlea/domains/verdiendutchleaders.v3host.nl/public_html/nederlands/admin/contact_mass_email.php on line 6

Warning: Cannot modify header information - headers already sent by (output started at /home/dutchlea/domains/verdiendutchleaders.v3host.nl/public_html/nederlands/admin/contact_mass_email.php:4) in /home/dutchlea/domains/verdiendutchleaders.v3host.nl/public_html/nederlands/admin/includes/config.inc.php on line 7

Dit is het script:

[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/require"]require[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]includes/config.inc.php[/COLOR][COLOR= #007700]);[/COLOR]

[COLOR= #0000BB]$sql[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"SELECT * FROM yob_users WHERE username=$user"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$sql[/COLOR][COLOR= #007700]);[/COLOR]        
[COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/mysql_close"]mysql_close[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$con[/COLOR][COLOR= #007700]);[/COLOR]
?>
[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]header.php[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$subject[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$HTTP_POST_VARS[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"subject"[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #0000BB]$subject[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$subject[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$content_1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$HTTP_POST_VARS[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"content_1"[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #0000BB]$content_1[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$content_1[/COLOR][COLOR= #007700],[/COLOR] ENT_QUOTES[COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$content_1[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$content_1[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$content_1[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"<font face="arial"> "[/COLOR][COLOR= #007700].[/COLOR] [COLOR= #0000BB]$content_1[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #DD0000]" </font>"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]();[/COLOR] [COLOR= #0000BB]$SQL[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT email FROM yob_users"[/COLOR][COLOR= #007700]);[/COLOR] [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]close[COLOR= #007700]();[/COLOR] [URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$row[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_array"]mysql_fetch_array[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$SQL[/COLOR][COLOR= #007700])){[/COLOR] [COLOR= #0000BB]$EmailAddress2[/COLOR][COLOR= #007700][] =[/COLOR] [COLOR= #0000BB]$row[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]; }[/COLOR] [COLOR= #0000BB]$SITEEMAIL[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]from[/COLOR][COLOR= #007700]];[/COLOR] ?>

<form method="post" action="contact_mass_email.php" class="f-wrap-1">
          <fieldset>
          <h3>Stuur iedereen een mail</h3>

            <label><b>Van:</b>
            <input type=text name=from class="f-name" value="noreply@verdiendutchleaders.nl"><br />
            </label>
            <label><b>Onderwerp:</b>
            <input type=text name=subject class="f-name"<br />
            </label>
            <label><b>Bericht:</b>
            <textarea name="content_1" rows="15" class="f-comments" value="Hey $user,">></textarea><br />
            </label>
            
            <div class="f-submit-wrap">
            <input type="submit" value="Voltooien" class="f-submit" tabindex="9" /><br />
            </div>
            </fieldset>


</form>

[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$content_1[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #DD0000]""[/COLOR] and [COLOR= #0000BB]$subject[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700]){[/COLOR] [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]connect[COLOR= #007700]();[/COLOR] [COLOR= #0000BB]$res[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT email FROM yob_users"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]();[/COLOR] [COLOR= #0000BB]$myDb[/COLOR][COLOR= #007700]->[/COLOR]close[COLOR= #007700]();[/COLOR] [COLOR= #0000BB]$subject2[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$subject[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"MIME-Version: 1.0
"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Content-type: text/html; charset=iso-8859-1
"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"From:"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$CURUSER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$mailbody[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$HTTP_POST_VARS[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"content_1"[/COLOR][COLOR= #007700]];[/COLOR] [COLOR= #0000BB]$to[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$nmax[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1000[/COLOR][COLOR= #007700];[/COLOR]  [COLOR= #0000BB]$nthis[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$ntotal[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$total[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700]);[/COLOR] [URL="http://www.php.net/while"]while[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$arr[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_row"]mysql_fetch_row[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$res[/COLOR][COLOR= #007700])){[/COLOR] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$nthis[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])[/COLOR] [COLOR= #0000BB]$to[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$arr[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]];[/COLOR] [URL="http://www.php.net/else"]else[/URL] [COLOR= #0000BB]$to[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]","[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$arr[/COLOR][COLOR= #007700][[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700]]; ++[/COLOR][COLOR= #0000BB]$nthis[/COLOR][COLOR= #007700]; ++[/COLOR][COLOR= #0000BB]$ntotal[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$nthis[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$nmax[/COLOR] [COLOR= #007700]||[/COLOR] [COLOR= #0000BB]$ntotal[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$total[/COLOR][COLOR= #007700]) {[/COLOR] [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](![/COLOR][URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"Multiple recipients <$SITEEMAIL>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"$subject"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$mailbody[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"From: $SITEEMAIL
Bcc: $to"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]"-f$SITEEMAIL"[/COLOR][COLOR= #007700]))[/COLOR] [COLOR= #0000BB]$nthis[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]; } }[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<p class=success>Sent From: $SITEEMAIL. <br />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Message: $mailbody <br />"[/COLOR][COLOR= #007700];[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"Bericht Verstuurd!</p>"[/COLOR][COLOR= #007700]; }[/COLOR] ?>

<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />&nbsp;<br />
[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/include"]include[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]footer.php[/COLOR][COLOR= #007700]);[/COLOR]?>


Wat zou het zijn??
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Je hebt geen verbinding met je database op het moment dat je query wordt uitgevoerd?
0
Krm

Lid

Berichten
6.235
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
regel 1 mischien normaal include?
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Dat moet niet uitmaken, maar ik denk dat je in je configbestand geen verbinding met je db maakt.
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ja , en het is een beetje raar gescript. emo
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Beetje maar. emo
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Eerst begint hij met een shorttag en daarna niet en als laatst weer wel emo
0
Tom

Lid

Berichten
3.868
Reputatie
0
Punten
0,02
Lid sinds
Laatst gezien
Je moet wel in de config file de juiste gegevens zetten van je databaseemo.
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Shahiem schreef:
Eerst begint hij met een shorttag en daarna niet en als laatst weer wel emo
Ja, kijk naar regel 8 of regel 32 dan. cry
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
Eerdere citaten tonen
Shahiem schreef:
Eerst begint hij met een shorttag en daarna niet en als laatst weer wel emo
Ja, kijk naar regel 8 of regel 32 dan. cry
Hahaha, maarja niet iedereen is zo goed in scripten smile
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Nee maar een entertje meer zou al heeel wat duidelijker zijn, en iedereen kan op enter duwen.
0
Berichten
20.364
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
Nee maar een entertje meer zou al heeel wat duidelijker zijn, en iedereen kan op enter duwen.
Lol, xdemo
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren