Jump to content

evilandy

New Members
  • Posts

    2
  • Joined

  • Last visited

    Never

Posts posted by evilandy

  1. so, I'm working on a contact form and I finished my code and everything andd it looks fine but it gives me an error on the line with the actual mail() function
    [code]<?php
    $name=$_POST['name'];
    $email=$_POST['senderemail'];
    $subject=$_POST['subject'];
    $reason=$_POST['reason'];
    $message=$_POST['message'];
    $message=wordwrap($message, 70);
    $ip = getenv('REMOTE_ADDR');

    if ($reason == 'nothingselected') {
        echo "You must select a reason for contact to procede. <a href=\"contact.html\">Go Back.</a>";
    }
    else {
        mail($reason, $subject, 'Sender: '$name'('$email')\n Sender\'s IP: '$ip'\n\nMessage: '$message, 'From: '$name 'Reply-To: '$email);
        echo "Thank you for your message.";
    }
    ?>[/code]
    can someone tell me whats wrong with it?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.