In addition, the radio buttons and checkboxes' values are not showing up...
Maybe someone can take a look here. Any help is appreciated
<?php # # NL-PHPMail v1.5 # Copyright 2002-2003 Sasha, http://nothing-less.net. All rights reserved. # First released December 11, 2002 # This version released October 6, 2003 # # NL-PHPMail v1.5 is linkware and can be used or modified as long as this note remains intact # and unaltered, and there is a link up back to http://codegrrl.com/ so people know where you got this script. You are forbidden to sell or distribute the code of NL-PHPMail v1.5, in whole # or part, without the written consent of Sasha. # # By using NL-PHPMail v1.5 you agree to indemnify Sasha from any liability. # # Website: http://codegrrl.com/scripts/phpmail/ # FAQ: http://codegrrl.com/faq/ # Support: http://forums.codegrrl.com/ # // ----------------------- //VARIABLES NEEDED FOR THE SCRIPT TO WORK, PLEASE CHANGE THESE AS SPECIFIED // ----------------------- //Your email address (where the form will be sent): $recipient = '[email protected]'; //The subject of the email: $subject = 'Request'; //Change this to the URL to your HTML form. $form_url = 'http://etcetera-graphics.t35.com/request/request.php'; //If you're using Headers and Footers with PHP, please fill in the path to them below. This can be a relative path (like, header.inc if it's in the same directory), or an absolute path. If you're NOT using headers, please leave this empty. $header ='header.php'; $footer ='footer.php'; //Below is the content of the actual email sent to you. If you have different or more form fields than specified here, copy and paste the below line (without the // in front of it) into the coding bit below. Beneath the Comments line would be a good place for it: // $msg .= "Field Description: $_POST[field_name]\n"; // Change the description and field name to match the field in your form. The $_POST[field_name] variable is what takes the contents of the form fields, so change "field_name" to the name of your form field. The . in front of the = sign merely means that line will be added to the variable, along with all previous lines, instead of overwriting it, so don't take it out! Use \t to insert a tab, and \n to insert a new line. $msg = "---------------\n"; $msg .= "$subject\n"; $msg .= "---------------\n\n"; $msg .= "Name: $_POST[name]\n"; $msg .= "Email: $_POST[email]\n"; $msg .= "Website: $_POST[url]\n"; $msg .= "Type: $_POST[type]\n"; $msg .= "Description: $_POST[description]\n"; $msg .= "Sender IP Address: $REMOTE_ADDR\n"; // Change the names below to the 3 required fields in your form. If these fields are not filled out, the script will not send an email and display an error message instead, asking the visitor to fill out the form again. $req1 ="$name"; $req2 ="$email"; $req3 ="$description"; //The below error message will be displayed if not all required fields are filled in. Feel free to use normal HTML in this. $error_required = '<link rel="stylesheet" href="style.css" type="text/css" /><p align="justify">It appears you forgot to enter either your <b>email address</b>, your <b>name</b> or a <b>description</b>. Please press the BACK button in your browser and try again. If you are receiving this message by mistake, please contact me <a href="mailto:[email protected]">here</a>.</p>'; //The below error message will be displayed if the visitor submitted an invalid email address. Feel free to use normal HTML in this. $error_email = '<link rel="stylesheet" href="style.css" type="text/css" /><p align="justify">It appears that the email address you provided is not valid. Please press the back button on your browser and try again. Please check carefully that you filled in all information in the right fields. If you are receiving this message by mistake, please contact me <a href="mailto:[email protected]">here</a>.</p>'; //The below success message will be displayed when the form is sent. Feel free to use normal HTML in this. $success_message = '<link rel="stylesheet" href="style.css" type="text/css" /><p align="justify">Your request has been sent, I will reply as soon as possible.</p>'; // ----------------------- //DO NOT EDIT ANYTHING BELOW UNLESS YOU KNOW WHAT YOU'RE DOING!! // ----------------------- if ($header ==""){ $use_headers ='0'; $header = '<html><head><title>Request Form</title></head><body>'; } else {$use_headers ='1';} if ($footer ==""){ $use_footers ='0'; $footer = '<div align="center"><a href="http://codegrrl.com/" target="_blank">Powered by NL-PHPMail</a></div></body></html>'; } else {$use_footers ='1';} function is_valid_email ($address) { return (preg_match( '/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+'. '@'. '([-0-9A-Z]+\.)+' . '([0-9A-Z]){2,4}$/i', trim($address))); } function is_valid_email_eregi ($address) { return (eregi( '^[-!#$%&\'*+\\./0-9=?A-Z^_`{|}~]+'. '@'. '([-0-9A-Z]+\.)+' . '([0-9A-Z]){2,4}$', trim($address))); } if (!isset($req1) || !isset($req2) || !isset($req3)) { header( "Location: $form_url" ); } elseif (empty($req1) || empty($req2) || empty($req3)) { if ($use_headers =="0"){ echo "$header"; } else { include ("$header"); } ?> <h2>Error</h2> <?=$error_required?> <? if ($use_footers =="0"){ echo "$footer"; } else { include ("$footer"); } } else { $f_email = $_POST[email]; $f_email = strtolower(trim($f_email)); if (is_valid_email($f_email)) { $msg .= "\n\n---------------\n"; $msg .= "NL-PHPMail v1.5 - http://codegrrl.com/\n"; $msg .= "---------------\n\n"; $mailheaders = "MIME-Version: 1.0 \n"; $mailheaders .= "Content-type: text/plain; charset=iso-8859-1 \n"; $mailheaders .= "From: \"$_POST[email]\" <$_POST[email]> \n"; $mailheaders .= "Reply-To: \"$_POST[email]\" <$_POST[email]> \n"; $mailheaders .= "X-Priority: 3 \n"; $mailheaders .= "X-MSMail-Priority: High \n"; $mailheaders .= "X-Mailer: PHP4"; mail($recipient, $subject, $msg, $mailheaders); if ($use_headers =="0"){ echo "$header"; } else { include ("$header"); } ?> <h2>Thank You<?=$name?></h2> <?=$success_message?> <? if ($use_footers =="0"){ echo "$footer"; } else { include ("$footer"); } } else { if ($use_headers =="0"){ echo "$header"; } else { include ("$header"); } ?> <h2>Error</h2> <?=$error_email?> <? if ($use_footers =="0"){ echo "$footer"; } else { include ("$footer"); } } } ?>
Edited by lil_cat_luver, 23 December 2005 - 04:14 AM.