Jump to content

codieB

Members
  • Posts

    24
  • Joined

  • Last visited

    Never

Everything posted by codieB

  1. Yes. I had been uploading the file to the server, but I copy/pasted your code and tried again---------------same results. I'm starting to suspect that it is a server thing and not the code. We use BlueHost. When I send the file locally, everything goes right. 1. The recipient receives the email 2. The person's name is included in the "Congratulations" message 3. The body comes in just fine 3. I get a BCC The only thing is, instead of the email appearing in my inbox with the name of the sender (included in script) the inbox indicates World Wide Web Server. What do you make of this? Thanks!
  2. Premiso, I take that back. I tried again and got the following: Array ( [fname] => this is this [lname] => gggggg => recipient@gmail.com [__utmz] => 94867584.1228847399.44.11.utmcsr=localhost|utmccn=(referral)|utmcmd=referral|utmcct=/index.php [__utma] => 94867584.2301122497633946400.1225294313.1228861685.1228938133.48 [__utmc] => 94867584 [__utmb] => 94867584.6.10.1228938133 )
  3. Hi, It's not working exactly as you suggested. The script doesn't die. When I push SUBMIT, the recipient gets the email.
  4. I'm sorry. I'm just not getting a white screen. When you say RUN the page, you mean test it in a browser, right? I get the form with input fields.
  5. OK. Let's see if I am following directions correctly. I copy/pasted the code you provided and tested the form in Firefox and Safari. It seemed like business as usual with no error messages. Array returned? None, I think. Does this comply with your statement: "Run that and then paste the array that is returned."
  6. Premiso, Same as usual. THe form goes through without an error message. I get the email subject line, the body content and the BCC. The only thing I don't get are the NAMES (fname, lname) that should appear at the beginning of the email.
  7. Hi Supporter, It is still doing the same thing without an error message. What did you mean by "If not your form is not populating/sending those values."? Do you know why? Is there a solution? Thanks!
  8. There was no error message. It just continued to send the email with everything EXCEPT the NAMES.
  9. Thanks for your reply, Supporter--- That didn't do it though. This is a real stumper!
  10. I posted yesterday. Seems this one might be a doozy. Almost ALL of the functionality is working save one. he purpose of this code is to get people to enter information in order to receive a "key" for access to a video archive. After pushing SUBMIT, they get an automated email response providing them with the link. THIS WORKS! Plus, I get a BCC, so I know what email addresses these are going to. WHAT DOESN"T WORK is the greeting, "Congratulations (Name). Please see following code. Your help would be GREATLY appreciated. no space <?php $menu1 = "none"; $menu2 = "none"; $menu3 = "none"; ?> <?php include '../../inc/pageheadhome.inc'; ?> <body id="home" class="colSM"> <?php include '../../inc/header_home.inc'; ?> <? // This is correctly indented ?> <div id="colmain3"> <div class="col3"> <div><div> <dl> <table id="Table_01" background="FACES_register/facesVideo.jpg" width="772" height="585" border="0" cellpadding="0" cellspacing="0"> <tr valign="middle"> <td width="194" valign=""> </td> <td width="561"><table><tr><td colspan="3"><table width="543"> <tr><td width="528" height="188px"> </td> </tr> <tr><td> <?php function spamcheck($field) { //filter_var() sanitizes the e-mail //address using FILTER_SANITIZE_EMAIL $field=filter_var($field, FILTER_SANITIZE_EMAIL); //filter_var() validates the e-mail //address using FILTER_VALIDATE_EMAIL if(filter_var($field, FILTER_VALIDATE_EMAIL)) { return TRUE; } else { return FALSE; } } if (isset($_REQUEST['email'])) {//if "email" is filled out, proceed //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['email']); if ($mailcheck==FALSE) { echo "Invalid input"; } else {//send email $Name = "name"; //senders name $email = "from.mycompany.com"; //senders e-mail adress $recipient = $_REQUEST['email']; //recipient $reply = "Congratulations! Video access for " .$_POST['fname']." ".$_POST['lname'].""; $mail_body = "body content"; //mail body //mail body $subject = "Video Access"; //subject $headers = "From: ". $Name . " <" . $email . ">\r\nbcc: blind@company.com\r\n"; //optional headerfields $headers .= "BCC: blindm@company.com\r\n"; mail($recipient, $subject, $mail_body, $reply, $headers); //mail command echo "<font size='3'><font color='#c61317'><strong>Thank you.</font></strong> Please check your email for the access link.</font>"; } } else {//if "email" is not filled out, display the form echo "<form method='post' action='videoAccess.php'> To gain access to the video archive, please fill out the form below.<br /><br /> First Name: <input name='fname' type='text' /><br /> Last Name: <input name='lname' type='text' /><br /> Email: <input name='email' type='text' /><br /><br /> Subject: <strong>Access to FACES archive</strong><br /><br /> <input type='submit' /> </form>"; } ?> no space
  11. No errors, but no luck either. I'm getting the same results I got when I started. Everything comes in just find except the greeting.
  12. That gave this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING on line 77
  13. Does anyone know how to include the recipients name in the reply email? I really need help with this. Everything else seems to work just fine. Thanks.
  14. Maq, I'm sorry---I hate to be slow here, but HOW does it display the errors? What identifies the errors? Do you have a solution to the reply problem or know how to include "Dear " in the automatic reply email?
  15. Maq, Will consistency help this work? Also, what does the code you sent do-----? ini_set ("display_errors", "1"); error_reporting(E_ALL);
  16. Is this better? nospaces <?php function spamcheck($field) { //filter_var() sanitizes the e-mail //address using FILTER_SANITIZE_EMAIL $field=filter_var($field, FILTER_SANITIZE_EMAIL); //filter_var() validates the e-mail //address using FILTER_VALIDATE_EMAIL if(filter_var($field, FILTER_VALIDATE_EMAIL)) { return TRUE; } else { return FALSE; } } if (isset($_REQUEST['email'])) {//if "email" is filled out, proceed //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['email']); if ($mailcheck==FALSE) { echo "Invalid input"; } else {//send email $Name = "name"; //senders name $email = "name@name.com"; //senders e-mail adress $recipient = $_REQUEST['email']; //recipient $reply = "Congratulations! Video access for " .$_POST['fname']." ".$_POST['lname'].""; $mail_body = "content "; //mail body $subject = "Video Access"; //subject $headers = "From: ". $Name . " <" . $email . ">\r\nbcc: susiem@multiprobe.com\r\n"; //optional headerfields $headers .= "BCC: name2@name2.com\r\n"; mail($recipient, $subject, $mail_body, $reply, $headers); //mail command echo "<font size='3'><font color='#c61317'><strong>Thank you.</font></strong> Please check your email for the access link.</font>"; } } else {//if "email" is not filled out, display the form echo "<form method='post' action='videoAccess.php'> First Name: <input name='fname' type='text' /><br /> Last Name: <input name='lname' type='text' /><br /> Email: <input name='email' type='text' /><br /><br /> Subject: <strong>Subject</strong><br /><br /> <input type='submit' /> </form>"; } ?> [/code}no spaces
  17. What this code does is send an automatic email to the email that is indicated in the form field. I also included fname and lname fields that are being pulled to personalize the email. So, without divulging entire contents of email, the recipient gets and email that offers a link to a video archive, and BCC's me at the same time. That way, I can see who is accessing the archive. In order to also get their names, I would like the emails to begin with "Dear ," or something to that affect. Does this help?
  18. Hi Supportr, NO ERROR message. I just don't get the fname and lname included in the reply. I get everything else though. ????
  19. Hi Supporter, That doesn't seem to work either.
  20. Is this what you need? <?php function spamcheck($field) { //filter_var() sanitizes the e-mail //address using FILTER_SANITIZE_EMAIL $field=filter_var($field, FILTER_SANITIZE_EMAIL); //filter_var() validates the e-mail //address using FILTER_VALIDATE_EMAIL if(filter_var($field, FILTER_VALIDATE_EMAIL)) { return TRUE; } else { return FALSE; } } if (isset($_REQUEST['email'])) {//if "email" is filled out, proceed //check if the email address is invalid $mailcheck = spamcheck($_REQUEST['email']); if ($mailcheck==FALSE) { echo "Invalid input"; } else {//send email $Name = "name"; //senders name $email = "name@name.com"; //senders e-mail adress $recipient = $_REQUEST['email']; //recipient $reply = "Congratulations! Video access for " .$_POST['fname']." ".$_POST['lname'].""; $mail_body = "content "; //mail body $subject = "Video Access"; //subject $headers = "From: ". $Name . " <" . $email . ">\r\nbcc: susiem@multiprobe.com\r\n"; //optional headerfields $headers .= "BCC: name2@name2.com\r\n"; mail($recipient, $subject, $mail_body, $reply, $headers); //mail command echo "<font size='3'><font color='#c61317'><strong>Thank you.</font></strong> Please check your email for the access link.</font>"; } } else {//if "email" is not filled out, display the form echo "<form method='post' action='videoAccess.php'> First Name: <input name='fname' type='text' /><br /> Last Name: <input name='lname' type='text' /><br /> Email: <input name='email' type='text' /><br /><br /> Subject: <strong>Subject</strong><br /><br /> <input type='submit' /> </form>"; } ?>
  21. Where do I put form for you to see it?
  22. How do you do that? This is my first time on site.
  23. Hi, This is what I've got---- $Name = "name"; //senders name $email = "name@name.com"; //senders e-mail adress $recipient = $_REQUEST['email']; //recipient $reply = "Congratulations! Video access for " .$_POST['fname']." ".$_POST['lname'].""; $mail_body = "content""; All of it is working EXCEPT the reply part. It should be pulling fname and lname rom input fields. Does anyone know what to do?
×
×
  • 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.