Új hozzászólás Aktív témák

  • PowerBuldog

    veterán

    sziasztok!

    egy email küldő php-t próbálok összehozni, de hibát dob

    Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\hexa\send_form_email.php on line 5

    Az egész ennyi lenne:

    ?php
    if(isset($_POST['email'])) {
     
    // EDIT THE 2 LINES BELOW AS REQUIRED
    $to = "you@yourdomain.com";
    $subject = "Your email subject line";
     
     
    function died($error) {
    // your error code can go here
    echo "We are very sorry, but there were error(s) found with the form you submitted. ";
    echo "These errors appear below.<br /><br />";
    echo $error."<br /><br />";
    echo "Please go back and fix these errors.<br /><br />";
    die();
    }
     
    // validation expected data exists
    if(!isset($_POST['first_name']) ||
    !isset($_POST['last_name']) ||
    !isset($_POST['email']) ||
    !isset($_POST['telephone']) ||
    !isset($_POST['comments'])) {
    died('We are sorry, but there appears to be a problem with the form you submitted.');  
    }

    stb de már az 5. sorra hibát ír

Új hozzászólás Aktív témák