1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Phrase errors

Discussion in 'Software Development' started by ]v[est, Jan 7, 2002.

Thread Status:
Not open for further replies.
  1. ]v[est

    ]v[est Thread Starter

    Joined:
    May 1, 2001
    Messages:
    41
    Well im trying to make a very simple email script using PHP. For some reason i get phrase errors (specified below). I know line the phrase error is on is correct. Can anyone help me out here?
    Heres what it looks like

    if ($op != "ds"){
    /* They need to see the form */
    echo "$form_block";
    }
    else if ($op == "ds"){

    if ($sender_name == ""){
    $name_err = "<font color=red>Please enter your name!</font><br>";
    $send = "no";
    }

    if ($sender_email == ""){
    $email_err = "<font color=red>Please enter your email address!</font><br>";
    $send = "no";
    }

    if ($message == ""){
    $message_err = "<font color=red>Please enter a message!</font><br>";
    $send = "no";
    }

    if ($send != "no"){
    /* It's ok to send */
    $msg = "E-Mail Sent From [1BEER6]\n";
    $msg .= "Sender's Name: $sender_name\n";
    $msg .= "Sender's E-Mail: $sender_email\n";
    $msg .= "Message: $message\n\n;
    $to = "[email protected]"; /* PHRASE ERROR OCCURS HERE!!! On this line*/
    $subject = "I want to join [1BEER6]";
    $mailheaders = "From: [1BEER6] <> \n";
    $mailheaders .= "Reply-To:
    $sender_email\n\n";
    mail($to, $subject, $msg, $mailheaders);
    echo "<p>Form has been sent!</p>";
    }

    else if )($send == "no"){

    echo "$name_err";
    echo "$email_err";
    echo "$message_err";
    echo "$form_block";
    }
    }

    Thanks in advance.
     
  2. MikeyD

    MikeyD

    Joined:
    Jan 11, 2002
    Messages:
    2
    The string being assigned to $msg is not properly terminated.

    $msg .= "Message: $message\n\n;

    should be:

    $msg .= "Message: $message\n\n";


    Hope this helps.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Phrase errors
  1. sebastian...
    Replies:
    10
    Views:
    287
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/64491

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice