Jump to content

Search the Community

Showing results for tags 'form'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (PhpStorm, VS Code, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

  1. Hi guys Hoping you can help me with this. I'm very much a front end person, I know HTML, CSS and some JS but when it comes to PHP and very much a newbie. I'm using this code to process a straight forward contact form. I'm using the PHP Mailer as I need to use an external smtp server and the company I use for this provided some basic code. Its working but I'm getting a error flash up before I see the success page that says "Undefined variable: message in send.php on line 25. Why is this happening and how do I fix it? Thanks guys. my code <?php require("PHPMailerAutoload.php"); // path to the PHPMailer class. $after = "/contact/thanks.php"; $oops = "/contact/error.php"; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Mailer = "smtp"; $mail->Host = "smtpcorp.com"; $mail->Port = "2525"; $mail->SMTPAuth = true; $mail->Username = "name@hotmail.com"; $mail->Password = "xxx"; $mail->From = "name@hotmail.com"; $mail->FromName = "Richard Dale"; $mail->AddAddress("name@hotmail.com", "Rachel Recipient"); $mail->AddReplyTo("name@hotmail.com", "Sender's Name"); $mail->Subject = "Contact enquiry from the website"; $message .= "How can we help: {$_POST['help']} \n\n"; $message .= "Name: {$_POST['name']} \n\n"; $message .= "Email: {$_POST['email']} \n\n"; $message .= "Telephone: {$_POST['tel']} \n\n"; $message .= "Message: {$_POST['message']} \n\n"; $message .= "Address: {$_POST['address']} \n\n"; $mail->Body = $message; $mail->WordWrap = 50; if(!$mail->Send()) { echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=$oops\">"; } else { echo "<meta HTTP-EQUIV=\"REFRESH\" content=\"0; url=$after\">"; } ?>
×
×
  • 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.