WordPress contact Form

  • Unknown's avatar

    Im working on my page and i have a problem .. I created a form with this code .

    <form action="kontaktirajte.php" class="box style">
    <fieldset>
            <legend>Formular za kontakt</legend>
            <div><label for="k1">Ime:</label><br> <input type="text" value="" name="ime" id="k1"></div>
            <div><label for="k2">Email:</label> <br><input type="mail" value="" name="mailadresa" id="k2"></div>
                    <div><textarea rows="7" cols="35" id="k3" name="poruka"></textarea><br>
        <input type="submit" value="OK" name="bkontakt" />
    
    </fieldset>

    After that i created a file called kontaktirajte.php with this code

    <?php
    if (isset($_POST['poruka']) ) {
    $ime = $_POST['ime'];
    $adresa = $_POST['email'];
    $poruka = $_POST['poruka'];
    $mail = '(email visible only to moderators and staff)';
    
        if(filter_var($adresa, FILTER_VALIDATE_EMAIL)) {
            $prima = "(email visible only to moderators and staff)";
            $subjekt = 'Info - Kontaktiranje';
            $textporuke = 'Korisnik sa imenom $ime vam salje sljedecu poruku... $poruka stshop.info';
            $headers = 'From: Nova primjedba na stshop.info';
            mail($prima,$subjekt,$textporuke,$headers);
        } else {
            echo "Email nije validan";
        }
    }
    
    ?>

    All that together looks like this http://stshop.info/kontakt/

    And now when i want to upload my kontaktirajte.php file on ftp , where i need to upload it ??

    I created the form on page kontakti..

    Have a nice day and thanks.

  • The topic ‘WordPress contact Form’ is closed to new replies.