1

My form doesn't want to send anymore, in the begin it did and now it is the same code but it doesn't send. Can someone help with this please. I know a little php but it is a long time ago that i used it.

HTML Code

<form id="formulier" name="myForm" action="post.php" method="post">

    <h4 class="titelopties">Welke opties had u graag nog bij de aanhangwagen toegevoegd</h4>

    <table>
        <!-- Rij 1 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Hoogrek</span>
                        <span class="prijs">&#8364; 95,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/hoogrek.png" alt="Hoogrek" width="100">
                    <input type="checkbox" name="optie[]" value="Hoogrek &ndash &ndash; &#8364; 95,00 Excl. BTW" id="checkbox-1-1" class="regular-checkbox" /><label for="checkbox-1-1"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Huif en stellage 1600 (lichtgrijs) </span>
                        <span class="prijs">&#8364; 725,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/huif.png" alt="Huif en stellage 1600 lichtgrijs" width="100">
                    <input type="checkbox" name="optie[]" value="Huif en stellage 1600 lichtgrijs &ndash; &#8364; 725,00 Excl. BTW" id="checkbox-1-2" class="regular-checkbox" /><label for="checkbox-1-2"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 2 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Vlakzeil (lichtgrijs)</span>
                        <span class="prijs">&#8364; 220,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/vlakzeil.png" alt="Vlakzeil" width="100"> 
                    <input type="checkbox" name="optie[]" value="Vlakzeil lichtgrijs &ndash; &#8364; 220,00 Excl. BTW" id="checkbox-1-3" class="regular-checkbox" /><label for="checkbox-1-3"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Opties zeilkleur huif oliver</span>
                        <span class="prijs">&#8364; 50,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/zeilkleur.png" alt="Zeilkleur huif oliver" width="100"> 
                    <input type="checkbox" name="optie[]" value="Opties zeilkleur huif oliver &ndash; &#8364; 50,00 Excl. BTW" id="checkbox-1-4" class="regular-checkbox" /><label for="checkbox-1-4"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 3 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Set uitzetsteunen</span>
                        <span class="prijs">&#8364; 160,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/uitzetsteunen.png" alt="Set uitzetsteunen" width="100"> 
                    <input type="checkbox" name="optie[]" value="Set uitzetsteunen &ndash; &#8364; 160?00 Excl. BTW" id="checkbox-1-5" class="regular-checkbox" /><label for="checkbox-1-5"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Loofrek 60cm</span>
                        <span class="prijs">&#8364; 360,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/loofrek.png" alt="Loofrek 60cm" width="100"> 
                    <input type="checkbox" name="optie[]" value="Loofrek 60cm &ndash; &#8364; 360,00 Excl. BTW" id="checkbox-1-6" class="regular-checkbox" /><label for="checkbox-1-6"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 4 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Net voor loofrek</span>
                        <span class="prijs">&#8364; 100,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/net-voor-loofrek.png" alt="Net voor loofrek" width="100"> 
                    <input type="checkbox" name="optie[]" value="Net voor loofrek &ndash; &#8364; 100,00 Excl. BTW" id="checkbox-1-7" class="regular-checkbox" /><label for="checkbox-1-7"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Meerprijs hoogteverstelbare dille D</span>
                        <span class="prijs">&#8364; 1 200,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/hoogteverstelbare-dissel.png" alt="Hoogteverstelbare dille D" width="100"> 
                    <input type="checkbox" name="optie[]" value="Meerprijs hoogteverslbare dille D &ndash; &#8364; 1 200,00 Excl. BTW" id="checkbox-1-8" class="regular-checkbox" /><label for="checkbox-1-8"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 5 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Schokdemperset</span>
                        <span class="prijs">&#8364; 80,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/schokdemperset.png" alt="Schokdemperset" width="100"> 
                    <input type="checkbox" name="optie[]" value="Schokdemperset &ndash; &#8364; 80,00 Excl. BTW" id="checkbox-1-9" class="regular-checkbox" /><label for="checkbox-1-9"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Meerprijs elektrisch bediend</span>
                        <span class="prijs">&#8364; 425,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/electrisch-bediend.png" alt="Elektrisch bediend" width="100"> 
                    <input type="checkbox" name="optie[]" value="Meerprijs elektrisch bediend &ndash; &#8364; 425,00 Excl. BTW" id="checkbox-1-10" class="regular-checkbox" /><label for="checkbox-1-10"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 6 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Meerprijs elektrisch en handbediend</span>
                        <span class="prijs">&#8364; 600,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/electrisch-en-handbediend.png" alt="Elektrisch en handbediend" width="100"> 
                    <input type="checkbox" name="optie[]" value="Meerprijs elektrisch en handbediend &ndash; &#8364; 600,00 Excl. BTW" id="checkbox-1-11" class="regular-checkbox" /><label for="checkbox-1-11"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Afstandsbediening elektrisch</span>
                        <span class="prijs">&#8364; 220,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/afstandsbediening.jpg" alt="Afstandsbediening elektrisch" width="100"> 
                    <input type="checkbox" name="optie[]" value="Afstandsbediening elektrisch &ndash; &#8364; 220,00 Excl. BTW" id="checkbox-1-12" class="regular-checkbox" /><label for="checkbox-1-12"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 7 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Dubbelscharnierend achterbord</span>
                        <span class="prijs">&#8364; 90,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/dubbelscharnierend-achterbord.png" alt="Dubbelscharnierend achterbord" width="100"> 
                    <input type="checkbox" name="optie[]" value="Dubbelscharnierend achterbord &ndash; &#8364; 90,00 Excl. BTW" id="checkbox-1-13" class="regular-checkbox" /><label for="checkbox-1-13"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Meerprijs borden 50cm</span>
                        <span class="prijs">&#8364; 650,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/meerprijs-borden.jpg" alt="Borden 50cm" width="100"> 
                    <input type="checkbox" name="optie[]" value="Meerprijs borden 50cm &ndash; &#8364; 650,00 Excl. BTW" id="checkbox-1-14" class="regular-checkbox" /><label for="checkbox-1-14"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 8 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Opzetborden 30cm</span>
                        <span class="prijs">&#8364; 600,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/opzetborden-30cm.png" alt="Opzetborden 30cm" width="100"> 
                    <input type="checkbox" name="optie[]" value="Opzetborden 30cm &ndash; &#8364; 600,00 Excl. BTW" id="checkbox-1-15" class="regular-checkbox" /><label for="checkbox-1-15"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Pomp PKC gemonteerd</span>
                        <span class="prijs">&#8364; 75,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/pomp-pkc-gemonteerd.jpg" alt="Pomp PKC gemonteerd" width="100"> 
                    <input type="checkbox" name="optie[]" value="Pomp PKC gemonteerd &ndash; &#8364; 75,00 Excl. BTW" id="checkbox-1-16" class="regular-checkbox" /><label for="checkbox-1-16"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 9 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Net 300x180cm</span>
                        <span class="prijs">&#8364; 30,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/net-300x180cm.png" alt="Net 300x180cm" width="100"> 
                    <input type="checkbox" name="optie[]" value="Net 300x180cm &ndash; &#8364; 30,00 Excl. BTW" id="checkbox-1-17" class="regular-checkbox" /><label for="checkbox-1-17"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Meerprijs lagere laadvloer</span>
                        <span class="prijs">&#8364; 75,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/lagere-laadvloer.png" alt="Lagere laadvloer" width="100"> 
                    <input type="checkbox" name="optie[]" value="Meerprijs lagere laadvloer &ndash; &#8364; 75,00 Excl. BTW" id="checkbox-1-18" class="regular-checkbox" /><label for="checkbox-1-18"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 10 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Diefstalslot</span>
                        <span class="prijs">&#8364; 35,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/diefstalslot.jpg" alt="Diefstalslot" width="100"> 
                    <input type="checkbox" name="optie[]" value="Diefstalslot &ndash; &#8364; 35,00 Excl. BTW" id="checkbox-1-19" class="regular-checkbox" /><label for="checkbox-1-19"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Reservewiel met steun</span>
                        <span class="prijs">&#8364; 165,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/reservewiel-met-steun.png" alt="Reservewiel met steun" width="100"> 
                    <input type="checkbox" name="optie[]" value="Reservewiel met steun &ndash; &#8364; 165,00 Excl. BTW" id="checkbox-1-20" class="regular-checkbox" /><label for="checkbox-1-20"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 11 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Spanband set (lc=1200 daN)</span>
                        <span class="prijs">&#8364; 30,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/spanband-set.png" alt="Spandband set" width="100"> 
                    <input type="checkbox" name="optie[]" value="Spanband set (lc=1200 daN) &ndash; &#8364; 30,00 Excl. BTW" id="checkbox-1-21" class="regular-checkbox" /><label for="checkbox-1-21"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Met 750kg totaalgewicht</span>
                        <span class="prijs">&#8364; 0,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/met-750kg-totaalgewicht.png" alt="750kg totaalgewicht" width="100"> 
                    <input type="checkbox" name="optie[]" value="Met 750kg totaalgewicht &ndash; &#8364; 0,00 Excl. BTW" id="checkbox-1-22" class="regular-checkbox" /><label for="checkbox-1-22"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 12 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Met 1000kg totaalgewicht</span>
                        <span class="prijs">&#8364; 0,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/met-1000kg-totaalgewicht.png" alt="1000kg totaalgewicht" width="100"> 
                    <input type="checkbox" name="optie[]" value="Met 1000kg totaalgewicht &ndash; &#8364; 0,00 Excl. BTW" id="checkbox-1-23" class="regular-checkbox" /><label for="checkbox-1-23"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Met 1200kg totaalgewicht</span>
                        <span class="prijs">&#8364; 0,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/met-1200kg-totaalgewicht.png" alt="1200kg totaalgewicht" width="100"> 
                    <input type="checkbox" name="optie[]" value="Met 1200kg totaalgewicht &ndash; &#8364; 0,00 Excl. BTW" id="checkbox-1-24" class="regular-checkbox" /><label for="checkbox-1-24"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
        <!-- Rij 13 -->
        <tr>
            <td>
                <div class="first-row">
                    <div class="tag">
                        <span class="naamoptie">Met 1300kg totaalgewicht</span>
                        <span class="prijs">&#8364; 0,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/met-1300kg-totaalgewicht.png" alt="1300kg totaalgewicht" width="100"> 
                    <input type="checkbox" name="optie[]" value="Met 1300kg totaalgewicht &ndash; &#8364; 0,00 Excl. BTW" id="checkbox-1-25" class="regular-checkbox" /><label for="checkbox-1-25"></label>
                    <br class="clear"/>
                </div>
            </td>

            <td>
                <div class="second-row">
                    <div class="tag">
                        <span class="naamoptie">Met 1350kg totaalgewicht</span>
                        <span class="prijs">&#8364; 0,00 Excl. BTW</span>
                    </div>
                    <img class="imagehover" src="images/opties/met-1350kg-totaalgewicht.png" alt="1350kg totaalgewicht" width="100"> 
                    <input type="checkbox" name="optie[]" value="Met 1350kg totaalgewicht &ndash; &#8364; 0,00 Excl. BTW" id="checkbox-1-26" class="regular-checkbox" /><label for="checkbox-1-26"></label>
                    <br class="clear"/>
                </div>
            </td>
        </tr>
    </table>


    <input class="newlineinput emailadres" name="email" type="email" placeholder="Email adres *" required />

    <input class="newlineinput" name="naam" type="text" placeholder="Naam *" required />

    <input class="floatnaastveld" name="bedrijf" type="text" placeholder="Bedrijf"/>

    <input class="newlineinput" name="plaats" type="text" placeholder="Plaats *" required />

    <input class="floatnaastveld" name="tefeloonnummer" type="text" placeholder="Telefoonnummer"/>

    <textarea name="message" placeholder="Uw bericht... *" required></textarea>

    <input class="newlineinput" type="submit" name="submit" value="Submit" />

</form>

PHP Code

<?php

    if ( !empty( $_POST['email'] ) && !empty( $_POST['message'] ) && isset( $_POST['optie'] )) {

        $optie = implode("\n", $_POST['optie'] );

        $email=$_POST['email'];


        $to      =  'example.test@hotmail.com';

        $headers = 'From:'. $email . "\r\n"; // Sender's Email

        $subject = "Offerte Kipper PKR 140 achterwaarts kippend";

        $message =  'Deze persoon vraag een offerte van de aanhangwagen Kipper PKR 140 achterwaarts kippend. ' . '
' .
                    'Dit zijn opties die hij gekozen heeft: ' . $optie . '
' .
                    'And has attached the following comment: 
' .
                    $_POST['message'];



        mail( $to, $subject, $message, $headers );

        echo "Thank you for using our mail form !";

    } else {

        echo "Er is iets niet ingevuld in het formulier !";
    }

?>

Can someone check this please? Thanks.

Neil
  • 13,042
  • 2
  • 26
  • 48
ArnoL
  • 11
  • 3

0 Answers0