PHP Error

Gestart doorEwan27 reacties92 weergaven

28 berichten · pagina 1 van 2

Ewan

Lid · Topicstarter

Berichten
8.302
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hey,

Ik heb deze error:

Parse error: syntax error, unexpected } in /home/***/domains/***/public_html/test/bestel.php on line 3


In dit bestand:
Spoiler tonen
[COLOR= #0000BB]<?php
            $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"***"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]])) }[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen voornaam ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen achternaam ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]
    
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen email-adres ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen adres ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen postcode ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen woonplaats ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]
    
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                ?>
                <form action="" method="POST">
            <table width="450px">
            </tr>
            <tr>
             <td valign="top">
              Voornaam:
             </td>
             <td valign="top">
              <input type="text" name="voornaam" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Achternaam:
             </td>
             <td valign="top">
              <input type="text" name="achternaam" maxlength="50" size="50">
             </td>
            </tr>
            <tr>
             <td valign="top">
              Email:
             </td>
             <td valign="top">
              <input type="text" name="email" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Adres:
             </td>
             <td valign="top">
              <input type="text" name="adres" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Postcode:
             </td>
             <td valign="top">
              <input type="text" name="postcode" maxlength="6" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Woonplaats:
             </td>
             <td valign="top">
              <input type="text" name="woonplaats" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Product:
             </td>
             <td valign="top">
              <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Prijs (per stuk):
             </td>
             <td valign="top">
              <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Aantal:
             </td>
             <td valign="top">
              <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Opmerkingen:
             </td>
             <td valign="top">
              <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
             </td> 
            </tr>
            <tr>
             <td colspan="2" style="text-align:center">
              <input type="submit" value="Bestel">
             </td>
             <td colspan="2" style="text-align:center">
              <input type="reset" value="Annuleer">
             </td>
            </tr>
            </table>
            </form>
                <br />
                <b>De volgende fouten zijn opgetreden:</b><br /><br />
                [COLOR= #0000BB]<?[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
Reply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"
X-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
                [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"product"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"<html>"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</html>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
                }
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            ?>
            <form action="" method="POST">
            <table width="450px">
            </tr>
            <tr>
             <td valign="top">
              Voornaam:
             </td>
             <td valign="top">
              <input type="text" name="voornaam" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Achternaam:
             </td>
             <td valign="top">
              <input type="text" name="achternaam" maxlength="50" size="50">
             </td>
            </tr>
            <tr>
             <td valign="top">
              Email:
             </td>
             <td valign="top">
              <input type="text" name="email" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Adres:
             </td>
             <td valign="top">
              <input type="text" name="adres" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Postcode:
             </td>
             <td valign="top">
              <input type="text" name="postcode" maxlength="6" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Woonplaats:
             </td>
             <td valign="top">
              <input type="text" name="woonplaats" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Product:
             </td>
             <td valign="top">
              <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Prijs (per stuk):
             </td>
             <td valign="top">
              <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Aantal:
             </td>
             <td valign="top">
              <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Opmerkingen:
             </td>
             <td valign="top">
              <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
             </td> 
            </tr>
            <tr>
             <td colspan="2" style="text-align:center">
              <input type="submit" value="Bestel">
             </td>
             <td colspan="2" style="text-align:center">
              <input type="reset" value="Annuleer">
             </td>
            </tr>
            </table>
            </form>
            [COLOR= #0000BB]<?php[/COLOR]
            [COLOR= #007700]}[/COLOR]
            ?>
Alleen zie ik de fout niet

Groetjes,
Ewan
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
zoals het er staat in de error, "onverwachte } op lijn 3"
Je moet de if openen met { en niet gelijk al sluiten met }.
0
Berichten
5.897
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Marjolein schreef:
zoals het er staat in de error, "onverwachte } op lijn 3"
Je moet de if openen met { en niet gelijk al sluiten met }.
ja, verander dat ook eens in de pb smile
Ik lette enkel of die ene fout
0
Berichten
6.144
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Nog een tip, als je je fouten netjes wilt.
Maak de array $fouten aan.

$fouten = array();


Fout toevoegen:

$fouten[] = Fout;


Fouten weergeven:

De volgende fouten zijn opgetreden:
<ul>
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/foreach"]foreach[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700]as[/COLOR] [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]) {[/COLOR]
    [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]<li>[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]</li>[/COLOR][COLOR= #007700];
}[/COLOR]
?>
</ul>
0
Ewan

Lid · Topicstarter

Berichten
8.302
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Het is me gelukt! Bedankt Marjolein.

@Jponsen daar snap ik helemaal niks van, dat script heb ik gewoon omgebouwd van me contact script.

Ik heb nu een nieuw probleem, om de dingen in de mail te zetten lukt me maar dan staat alles achterelkaar. Ik wil dus dat er een enter tussen zit en dat er Voornaam:, Achternaam: etc voor staat.

Code:
Spoiler tonen
[COLOR= #0000BB]<?php
            $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"***"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
            [URL="http://www.php.net/if"]if[/URL]  [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen voornaam ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen achternaam ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]
    
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen email-adres ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen adres ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen postcode ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]

                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
                [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
                [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen woonplaats ingevoerd<br />"[/COLOR][COLOR= #007700];
                }[/COLOR]
    
                [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
                ?>
                <form action="" method="POST">
            <table width="450px">
            </tr>
            <tr>
             <td valign="top">
              Voornaam:
             </td>
             <td valign="top">
              <input type="text" name="voornaam" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Achternaam:
             </td>
             <td valign="top">
              <input type="text" name="achternaam" maxlength="50" size="50">
             </td>
            </tr>
            <tr>
             <td valign="top">
              Email:
             </td>
             <td valign="top">
              <input type="text" name="email" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Adres:
             </td>
             <td valign="top">
              <input type="text" name="adres" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Postcode:
             </td>
             <td valign="top">
              <input type="text" name="postcode" maxlength="6" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Woonplaats:
             </td>
             <td valign="top">
              <input type="text" name="woonplaats" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Product:
             </td>
             <td valign="top">
              <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Prijs (per stuk):
             </td>
             <td valign="top">
              <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Aantal:
             </td>
             <td valign="top">
              <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Opmerkingen:
             </td>
             <td valign="top">
              <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
             </td> 
            </tr>
            <tr>
             <td colspan="2" style="text-align:center">
              <input type="submit" value="Bestel">
             </td>
             <td colspan="2" style="text-align:center">
              <input type="reset" value="Annuleer">
             </td>
            </tr>
            </table>
            </form>
                <br />
                <b>De volgende fouten zijn opgetreden:</b><br /><br />
                [COLOR= #0000BB]<?[/COLOR]
                [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
                }[/COLOR]
                [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
                [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnReply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnX-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
                [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"product"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"-----Bestelling-----"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"-----Bestelling-----"[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
                }
            }[/COLOR]
            [URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
            ?>
            <form action="" method="POST">
            <table width="450px">
            </tr>
            <tr>
             <td valign="top">
              Voornaam:
             </td>
             <td valign="top">
              <input type="text" name="voornaam" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Achternaam:
             </td>
             <td valign="top">
              <input type="text" name="achternaam" maxlength="50" size="50">
             </td>
            </tr>
            <tr>
             <td valign="top">
              Email:
             </td>
             <td valign="top">
              <input type="text" name="email" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Adres:
             </td>
             <td valign="top">
              <input type="text" name="adres" maxlength="100" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Postcode:
             </td>
             <td valign="top">
              <input type="text" name="postcode" maxlength="6" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Woonplaats:
             </td>
             <td valign="top">
              <input type="text" name="woonplaats" maxlength="50" size="50">
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Product:
             </td>
             <td valign="top">
              <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Prijs (per stuk):
             </td>
             <td valign="top">
              <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Aantal:
             </td>
             <td valign="top">
              <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
             </td>
            </tr> 
            <tr>
             <td valign="top">
              Opmerkingen:
             </td>
             <td valign="top">
              <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
             </td> 
            </tr>
            <tr>
             <td colspan="2" style="text-align:center">
              <input type="submit" value="Bestel">
             </td>
             <td colspan="2" style="text-align:center">
              <input type="reset" value="Annuleer">
             </td>
            </tr>
            </table>
            </form>
            [COLOR= #0000BB]<?php[/COLOR]
            [COLOR= #007700]}[/COLOR]
            ?>
toevoeging op 11 december 2011, 18:29:22:
Bumppppp
0
Ewan

Lid · Topicstarter

Berichten
8.302
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Bump
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnReply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnX-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Naam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Achternaam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Adres: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR]adres[COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #FF8000]// enzovoort[/COLOR]

[URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"product"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"-----Bestelling-----"[/COLOR] [COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
      }[/COLOR]
?>


zoiets wordt het dan,
0
Ewan

Lid · Topicstarter

Berichten
8.302
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Daar is dit uitgekomen:
Spoiler tonen
[COLOR= #0000BB]<?php
      $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"helpdesk@filmings.co.cc"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
      [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700](([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]]) && ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]])) {[/COLOR]
      [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
      [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen voornaam ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen achternaam ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
 
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen email-adres ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen adres ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen postcode ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]

        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen woonplaats ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
 
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]) {[/COLOR]
        ?>
        <form action="" method="POST">
      <table width="450px">
      </tr>
      <tr>
      <td valign="top">
       Voornaam:
      </td>
      <td valign="top">
       <input type="text" name="voornaam" maxlength="50" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Achternaam:
      </td>
      <td valign="top">
       <input type="text" name="achternaam" maxlength="50" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Email:
      </td>
      <td valign="top">
       <input type="text" name="email" maxlength="100" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Adres:
      </td>
      <td valign="top">
       <input type="text" name="adres" maxlength="100" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Postcode:
      </td>
      <td valign="top">
       <input type="text" name="postcode" maxlength="6" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Woonplaats:
      </td>
      <td valign="top">
       <input type="text" name="woonplaats" maxlength="50" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Product:
      </td>
      <td valign="top">
       <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
      </td>
      </tr>
      <tr>
      <td valign="top">
       Prijs (per stuk):
      </td>
      <td valign="top">
       <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
      </td>
      </tr>
      <tr>
      <td valign="top">
       Aantal:
      </td>
      <td valign="top">
       <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
      </td>
      </tr>
      <tr>
      <td valign="top">
       Opmerking(en):
      </td>
      <td valign="top">
       <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
      </td>
      </tr>
      <tr>
      <td colspan="2" style="text-align:center">
       <input type="submit" value="Bestel">
      </td>
      <td colspan="2" style="text-align:center">
       <input type="reset" value="Annuleer">
      </td>
      </tr>
      </table>
      </form>
        <br />
        <b>De volgende fouten zijn opgetreden:</b><br /><br />
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/else"]else[/URL] [COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnReply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnX-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Voornaam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Achternaam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"E-mail: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Adres: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]adres[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Postcode: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]postcode[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Woonplaats: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]woonplaats[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Product: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]product[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Prijs (per stuk): "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Aantal: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantal[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]. =[/COLOR] [COLOR= #DD0000]"Opmerking(en): "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]opmerkingen[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]

[URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"product"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"-----Bestelling-----"[/COLOR] [COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
   }[/COLOR]
?>
      <form action="" method="POST">
      <table width="450px">
      </tr>
      <tr>
      <td valign="top">
       Voornaam:
      </td>
      <td valign="top">
       <input type="text" name="voornaam" maxlength="50" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Achternaam:
      </td>
      <td valign="top">
       <input type="text" name="achternaam" maxlength="50" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Email:
      </td>
      <td valign="top">
       <input type="text" name="email" maxlength="100" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Adres:
      </td>
      <td valign="top">
       <input type="text" name="adres" maxlength="100" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Postcode:
      </td>
      <td valign="top">
       <input type="text" name="postcode" maxlength="6" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Woonplaats:
      </td>
      <td valign="top">
       <input type="text" name="woonplaats" maxlength="50" size="50">
      </td>
      </tr>
      <tr>
      <td valign="top">
       Product:
      </td>
      <td valign="top">
       <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
      </td>
      </tr>
      <tr>
      <td valign="top">
       Prijs (per stuk):
      </td>
      <td valign="top">
       <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
      </td>
      </tr>
      <tr>
      <td valign="top">
       Aantal:
      </td>
      <td valign="top">
       <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
      </td>
      </tr>
      <tr>
      <td valign="top">
       Opmerking(en):
      </td>
      <td valign="top">
       <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
      </td>
      </tr>
      <tr>
      <td colspan="2" style="text-align:center">
       <input type="submit" value="Bestel">
      </td>
      <td colspan="2" style="text-align:center">
       <input type="reset" value="Annuleer">
      </td>
      </tr>
      </table>
      </form>
      [COLOR= #0000BB]<?php[/COLOR]
      [COLOR= #007700]}[/COLOR]
      ?>
Maar nu krijg ik deze error:

Quote:
Parse error: syntax error, unexpected T_STRING in /home/ewan/domains/filmings.co.cc/public_html/test/bestel.php on line 2
0
Berichten
35.796
Reputatie
1
Punten
0,00
Lid sinds
Laatst gezien
Eerste regels worden dit:
[COLOR= #0000BB]<?php
            $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"helpdesk@filmings.co.cc"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
            [URL="http://www.php.net/if"]if[/URL]  [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]])) {[/COLOR]


je had teveel haakjes

oh en probeer je code goed uit te lijnen; scheelt ook een boel fouten smile
0
Ewan

Lid · Topicstarter

Berichten
8.302
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Lennard schreef:
Eerste regels worden dit:
[COLOR= #0000BB]<?php
            $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"helpdesk@filmings.co.cc"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
            [URL="http://www.php.net/if"]if[/URL]  [COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]])) {[/COLOR]


je had teveel haakjes

oh en probeer je code goed uit te lijnen; scheelt ook een boel fouten smile
En hoe moet ik dat dan uitlijnen? emo het enige php dat ik kan is includen emo
toevoeging op 12 december 2011, 00:29:12:
En nog steeds dezelfde error sadley
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
voor de else op lijn 134 moet nog een }
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spoiler tonen
[COLOR= #0000BB]<?php
    $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"***"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen voornaam ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen achternaam ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen email-adres ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen adres ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen postcode ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]]))
        {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen woonplaats ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]!=[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
        {[/COLOR]
?>
<form action="" method="POST">
    <table width="450px">
        <tr>
            <td valign="top">
                Voornaam:
            </td>
            <td valign="top">
                <input type="text" name="voornaam" maxlength="50" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Achternaam:
            </td>
            <td valign="top">
                <input type="text" name="achternaam" maxlength="50" size="50">
            </td>
        </tr>
        <tr>
            <td valign="top">
                Email:
            </td>
            <td valign="top">
                <input type="text" name="email" maxlength="100" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Adres:
            </td>
            <td valign="top">
                <input type="text" name="adres" maxlength="100" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Postcode:
            </td>
            <td valign="top">
                <input type="text" name="postcode" maxlength="6" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Woonplaats:
            </td>
            <td valign="top">
                <input type="text" name="woonplaats" maxlength="50" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Product:
            </td>
            <td valign="top">
                <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Prijs (per stuk):
            </td>
            <td valign="top">
                <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Aantal:
            </td>
            <td valign="top">
                <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Opmerkingen:
            </td>
            <td valign="top">
                <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
            </td> 
        </tr>
        <tr>
            <td colspan="2" style="text-align:center">
                <input type="submit" value="Bestel">
            </td>
            <td colspan="2" style="text-align:center">
                <input type="reset" value="Annuleer">
            </td>
        </tr>
    </table>
</form>
<br />
<b>De volgende fouten zijn opgetreden:</b><br /><br />
[COLOR= #0000BB]<?[/COLOR]
            [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
        }[/COLOR]
        [URL="http://www.php.net/else"]else[/URL]
        [COLOR= #007700]{[/COLOR]
            [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnReply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnX-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
            [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"product"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"<html>"[/COLOR][COLOR= #007700].[/COLOR][URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]"</html>"[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
        }
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
?>
<form action="" method="POST">
    <table width="450px">
        <tr>
            <td valign="top">
                Voornaam:
            </td>
            <td valign="top">
                <input type="text" name="voornaam" maxlength="50" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Achternaam:
            </td>
            <td valign="top">
                <input type="text" name="achternaam" maxlength="50" size="50">
            </td>
        </tr>
        <tr>
            <td valign="top">
                Email:
            </td>
            <td valign="top">
                <input type="text" name="email" maxlength="100" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Adres:
            </td>
            <td valign="top">
                <input type="text" name="adres" maxlength="100" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Postcode:
            </td>
            <td valign="top">
                <input type="text" name="postcode" maxlength="6" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Woonplaats:
            </td>
            <td valign="top">
                <input type="text" name="woonplaats" maxlength="50" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Product:
            </td>
            <td valign="top">
                <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Prijs (per stuk):
            </td>
            <td valign="top">
                <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Aantal:
            </td>
            <td valign="top">
                <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Opmerkingen:
            </td>
            <td valign="top">
                <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
            </td> 
        </tr>
        <tr>
            <td colspan="2" style="text-align:center">
                <input type="submit" value="Bestel">
            </td>
            <td colspan="2" style="text-align:center">
                <input type="reset" value="Annuleer">
            </td>
        </tr>
    </table>
</form>
[COLOR= #0000BB]<?php[/COLOR]
    [COLOR= #007700]}[/COLOR]
?>
Even de code uitgelijnd
0
Ewan

Lid · Topicstarter

Berichten
8.302
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Marjolein schreef:
voor de else op lijn 134 moet nog een }
Maar hij geeft een error op lijn 2, overigens is lijn 134 html?

@Luuk dat is de oude code
0
Berichten
18.482
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Spoiler tonen
[COLOR= #0000BB]<?php
    $cmail[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"helpdesk@filmings.co.cc"[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// Jouw email adres hier.[/COLOR]
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"woonplaats"[/COLOR][COLOR= #007700]]))
    {[/COLOR]
        [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700];[/COLOR]
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"voornaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen voornaam ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"achternaam"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen achternaam ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen email-adres ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"adres"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen adres ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"postcode"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen postcode ingevoerd<br />"[/COLOR][COLOR= #007700];
        }[/COLOR]
        
        [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][URL="http://www.php.net/empty"]empty[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"email"[/COLOR][COLOR= #007700]])) {[/COLOR]
            [COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]++;[/COLOR]
            [COLOR= #0000BB]$fouten[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Geen woonplaats ingevoerd<br />"[/COLOR][COLOR= #007700];
        }
        
    }[/COLOR]
    
    [URL="http://www.php.net/if"]if[/URL][COLOR= #007700](![/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]) || ([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fout[/COLOR][COLOR= #007700]) &&[/COLOR] [COLOR= #0000BB]$fout[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700]))
    {[/COLOR]
?>
<br />
<b>De volgende fouten zijn opgetreden:</b><br /><br />
[COLOR= #0000BB]<?php[/COLOR]
        [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fouten[/COLOR][COLOR= #007700];
    }[/COLOR]
    [URL="http://www.php.net/else"]else[/URL]
    [COLOR= #007700]{[/COLOR]
        [COLOR= #0000BB]$headers[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"From: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnReply-To: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rnX-Mailer: PHP/"[/COLOR] [COLOR= #007700].[/COLOR] [URL="http://www.php.net/phpversion"]phpversion[/URL][COLOR= #007700]();[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"Voornaam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]voornaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Achternaam: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]achternaam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"E-mail: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]email[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Adres: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]adres[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Postcode: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]postcode[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Woonplaats: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]woonplaats[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Product: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]product[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Prijs (per stuk): "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]prijs[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Aantal: "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]aantal[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        [COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #DD0000]"Opmerking(en): "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]opmerkingen[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"rn"[/COLOR][COLOR= #007700];[/COLOR]
        
        [URL="http://www.php.net/mail"]mail[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$cmail[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]"product"[/COLOR][COLOR= #007700]],[/COLOR] [COLOR= #DD0000]"-----Bestelling-----"[/COLOR] [COLOR= #007700],[/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #0000BB]$headers[/COLOR][COLOR= #007700]);
    }[/COLOR]
?>
<form action="" method="POST">
    <table width="450px">
        <tr>
            <td valign="top">
                Voornaam:
            </td>
            <td valign="top">
                <input type="text" name="voornaam" maxlength="50" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Achternaam:
            </td>
            <td valign="top">
                <input type="text" name="achternaam" maxlength="50" size="50">
            </td>
        </tr>
        <tr>
            <td valign="top">
                Email:
            </td>
            <td valign="top">
                <input type="text" name="email" maxlength="100" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Adres:
            </td>
            <td valign="top">
                <input type="text" name="adres" maxlength="100" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Postcode:
            </td>
            <td valign="top">
                <input type="text" name="postcode" maxlength="6" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Woonplaats:
            </td>
            <td valign="top">
                <input type="text" name="woonplaats" maxlength="50" size="50">
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Product:
            </td>
            <td valign="top">
                <input type="text" name="product" maxlength="100" size="50" value="Test" readonly>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Prijs (per stuk):
            </td>
            <td valign="top">
                <input type="text" name="prijs" maxlength="100" size="50" value="Test" readonly>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Aantal:
            </td>
            <td valign="top">
                <select name="aantal"><option value="1">1</option><option value="2">2</option><option value="3">3</option><option value="4">4</option><option value="5">5</option><option value="6">6</option><option value="7">7</option><option value="8">8</option><option value="9">9</option><option value="10">10</option></select>
            </td>
        </tr> 
        <tr>
            <td valign="top">
                Opmerking(en):
            </td>
            <td valign="top">
                <textarea name="opmerkingen" maxlength="1000" cols="39" rows="6"></textarea>
            </td> 
        </tr>
        <tr>
            <td colspan="2" style="text-align:center">
                <input type="submit" value="Bestel">
            </td>
            <td colspan="2" style="text-align:center">
                <input type="reset" value="Annuleer">
            </td>
        </tr>
    </table>
</form>
Zo dan?
0
Berichten
15.446
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Ewan schreef:
Eerdere citaten tonen
Marjolein schreef:
voor de else op lijn 134 moet nog een }
Maar hij geeft een error op lijn 2, overigens is lijn 134 html?

@Luuk dat is de oude code
omdat op lijn 2 de fout begint maar dat wil niet zeggen dat de fout daar ook zit. En ik zie toch echt php op lijn 134 of zit ik scheef te kijken yummie
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