Jump to content

Search the Community

Showing results for tags 'web site mail code'.

  • 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

Found 1 result

  1. Dear readers and coders, I have to recognize I do not have any idea on coding, but not having enought fund to hire a coder I have to do it myself, but some time I cannot solve the issue, and that is the reason I am posting this topic. I need a Html form trasmiting to a PHP code all fields and this last sending it to my email account. For that I got a free basic code and try to modify to my need but without success. The script give an error when all fields are listed in the mail (?) working fine just with the original field "$Comments". Can any of you tell me the problem or get this script to work. I award with 10 USD paid by paypal to the first put this code to work properly. ###### Script ############# <?php $to = "acmoreu@terra.es"; ini_set("SMTP","localhost"); $quotation_page = "quotation_form.html"; $error_page = "error_message.html"; $thankyou_page = "thank_you.html"; $company = $_REQUEST['company'] ; $name = $_REQUEST['name'] ; $phone = $_REQUEST['phone'] ; $email_address = $_REQUEST['email_address'] ; $products = $_REQUEST['products'] ; $items = $_REQUEST['items'] ; $area = $_REQUEST['area'] ; $date = $_REQUEST['date'] ; $address = $_REQUEST['address'] ; $city = $_REQUEST['city'] ; $province = $_REQUEST['province'] ; $country = $_REQUEST['country'] ; $comments = $_REQUEST['comments'] ; function isInjected($str) { $injections = array('(\n+)', '(\r+)', '(\t+)', '(%0A+)', '(%0D+)', '(%08+)', '(%09+)' ); $inject = join('|', $injections); $inject = "/$inject/i"; if(preg_match($inject,$str)) { return true; } else { return false; } } // If the user tries to access this script directly, redirect them to the quotation form, if (!isset($_REQUEST['email_address'])) { header( "Location: $quotation_page" ); } // If the form fields are empty, redirect to the error page. elseif (empty($email_address) || empty($comments)) { header( "Location: $error_page" ); } // If email injection is detected, redirect to the error page. elseif ( isInjected($email_address) ) { header( "Location: $error_page" ); } // If we passed all previous tests, send the email then redirect to the thank you page. else { mail( "$to", "Quotation Request - Flexypatch", "$company", "$name", "$phone", $products, $items, $area, $date, $address, $city, $province, $country, $comments, "From: $email_address" ); header( "Location: $thankyou_page" ); } ?> ############# Errors ################### Warning: mail() expects at most 5 parameters, 15 given in D:\hshome\klassmar\flexypatch.com\Quotation\send_mail.php on line 59 Warning: Cannot modify header information - headers already sent by (output started at D:\hshome\klassmar\flexypatch.com\Quotation\send_mail.php:59) in D:\hshome\klassmar\flexypatch.com\Quotation\send_mail.php on line 60 I can provide the html pages code of the filling form, if need. Thanks! error_message.html quotation_form.html send_mail.php thank_you.html
×
×
  • 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.