Jump to content

timothyltaylor

Members
  • Posts

    14
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

timothyltaylor's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Anyone have experience sending an autoresponse via php? Right now, this doesn't send any autoresponse. Is the following part of the code correct: [code]mail($to, $subject, $body, $headers);     mail($email, $autoresponder);[/code] Can you help me figure out how to correct this code please? Thanks so much,     Timothy T. [code]// create autoresponse $autoresponder = " Dear CAP Student,   Thanks for attending the CAP 3 class and filling out the evaluation. I appreciate your honest comments they will help us make the CAP experience better. The answer key for the CPAA practice exam can be downloaded at http://www.mysite.com/downloads.html   Best of Luck with the CPAA exam.   You will begin receiving our newsletter via e-mail.  See you soon!   <strong>Timothy Taylor</strong> 800-000-0000 mymail@myname.com   Home Office: address;       $to = "mymail@myname.com";       $subject = "Evaluation Results from $name";       $headers = "Content-type: text/html; charset=iso-8859-1\r\n";       $headers .= "From: $name <$email> \r\n";       $headers .= "Bcc: mymail@myname.com \r\n";       $headers .= "Reply-to: mymail@myname.com \r\n";       mail($to, $subject, $body, $headers);     mail($email, $autoresponder);[/code]
  2. Good call. So, say that I'm receiving the user's name through form input. The field input on the form is named "name". I define it as : $name=$_POST['name']; in my "process.php file" I can then go to a separate file named "results.php" and use: $name=$_POST['name']; Then I can use the following code to display/use that same input value?: [code] ...echo "      <p align=\"center\">This certificate is presented to</p>\n"; echo "      <p align=\"center\">$name</p>\n";  ...[/code]
  3. What if different users/different computers are accesing the form at the same time? Will each user's information be kept and displayed on a "results.php" page where the records are to be displayed in? For instance I want 1 user to store his name in the database. He fills it out, and then I grab that specific name to display it onto another page in a certificate. If I try and use the superglobal, $_Post, will it be able to grab his specific name - EVEN when other user's are accessing the same form from different computers? Or will the "saved" records get mixed up between users? thanks for helping,       Lee
  4. Thanks. That's a big help. Do I need to add an: [code]ob_start();[/code] at the end? Also, 1) How do I hide the url (with the user's password and username) in a php script? ALSO 2) How do I carry user's (form) input records to another page, without grabbing them from the database?       BECAUSE             a) if I grabbed them from the database, I'd have to use the session_start () and session_stop () and I'd rather not Thanks!     Lee T.      
  5. I realize this is very common, especially when starting and stopping a session(). I'm not using those commands here, and still have a problem with the error: "Warning: Cannot modify header information - headers already sent by (output started at /xxxxxx/xxxxxxx/xxxxxxxxxx-www/xxxxxxx/process.php:83) in /xxxxxxx/xxxxxxx/xxxxxxxxx-www/xxxxxxx/process.php on line 123" Here's my code: [code] $send = mail("myname@mysite.com", "EPSA CAP2 Evaluation Results from $name", $body, "Content-type: text/html"); $send2 = mail('$email', "Your EPSA CAP2 Evaluation Results:", $body, "Content-type: text/html"); if($send) header ("Location: xxxxxxxxx.com=1"); else print "We encountered an error sending your mail, please notify myname@mysite.com"; ?>[/code] Can someone give any suggestions? Thank you!     Lee T.
  6. Can anyone help me figure out why nothing is going into the database from this end? I would really appreciate it! (specifically in the "mysql_query("INSERT INTO" statement)   Thank you... Here's my code: [code]<? $classdateandlocation=$_POST['classdateandlocation']; $instructors=$_POST['instructors']; $comments=$_POST['comments']; $name=$_POST['name']; $email=$_POST['email']; $address=$_POST['address']; $city=$_POST['city']; $state=$_POST['state']; $zip=$_POST['zip']; $phone=$_POST['phone']; $Q1=$_POST['Q1']; $Q2=$_POST['Q2']; $Q3=$_POST['Q3']; $Q4=$_POST['Q4']; $Q5=$_POST['Q5']; $Q6=$_POST['Q6']; $Q7=$_POST['Q7']; $Q8=$_POST['Q8']; $Q9=$_POST['Q9']; } if(trim($_POST['classdateandlocation']) == "") {   die("*No <b>Class Date and Location</b> was entered, please click back button and fill in required fields"); } if(trim($_POST['instructors']) == "") {   die("*No <b>Instructors</b> were entered, please click back button and fill in required fields"); } if(trim($_POST['comments']) == "") {   die("*No <b>Comments</b> were entered, please click back button and fill in required fields"); } if(trim($_POST['name']) == "") {   die("*No <b>Name<b/> was entered, please click back button and fill in required fields"); } if(trim($_POST['address']) == "") {   die("*No <b>Address</b> was entered, please click back button and fill in required fields"); } if(trim($_POST['city']) == "") {   die("*No <b>City<b/> was entered, please click back button and fill in required fields"); } if(trim($_POST['state']) == "") {   die("*No <b>State</b> was entered, please click back button and fill in required fields"); } if(trim($_POST['zip']) == "") {   die("*No <b>Zip</b> was entered, please click back button and fill in required fields"); } if(trim($_POST['phone']) == "") {   die("*No <b>Phone</b> was entered, please click back button and fill in required fields"); } if(trim($_POST['Q1']) == "") {   die("<b>*Question 1<b/> wasn't filled out, please click back button and fill in required fields"); } mysql_connect("mysite.com", "xxxxxxx", "xxxxxxxxxxx") or die(mysql_error()); mysql_select_db("xxxxxxx_com_xxxxx") or die(mysql_error()); mysql_query("INSERT INTO `data` VALUES ( '$classdateandlocation', '$instructors', '$comments','$name', '$email', '$address', '$city', '$state', '$zip', '$phone')"); if(trim($_POST['classdateandlocation']) == "") {   die("*No <b>Class Date and Location</b> was entered, please click back button and fill in required fields"); Print "Your information has been successfully added to the database."; echo "<p>Here is what you entered:<p>"; echo "<p><b>Class Date and Location:</b> $classdateandlocation<p>"; echo "<p><b>Instructors:</b> $instructors<p>"; echo "<p><b>Comments:</b> $comments<p>"; echo "<p><b>Name:</b> $name<p>"; echo "<p><b>Email:</b> $email<p>"; echo "<p><b>Address:</b> $address<p>"; echo "<p><b>City:</b> $city<p>"; echo "<p><b>State:</b> $state<p>"; echo "<p><b>Zip:</b> $zip<p>"; echo "<p><b>Phone:</b> $phone<p>"; echo "<p><b>This learning Experience was:</b> $Q1<p>"; echo "<p><b>Were the stated learning objectives met?:</b> $Q2<p>"; echo "<p><b>If applicable, were prerequisites appropriate?:</b> $Q3<p>"; echo "<p><b>Were program materials both accurate and effective?:</b> $Q4<p>"; echo "<p><b>Did program materials contribute to the achievement of the learning Objectives?:</b> $Q5<p>"; echo "<p><b>Was the time allotted to the learning experience appropriate?:</b> $Q6<p>"; echo "<p><b>Were the facilities and/or the technological equipment appropriate?:</b> $Q7<p>"; echo "<p><b>Were the handouts and advanced preparation materials satisfactory?:</b> $Q8<p>"; echo "<p><b>Was the classroom facilitators knowledge and experience satisfactory for the course material?:</b> $Q9<p>";       mail("myname@mysite.com", "EPSA CAP2 Evaluation Results from $name", $body, $email, $headers ); ?>[/code]        Lee
  7. Does anybody know how to install pdflib on a MAC? How do I go about (starting) to create a PDF-generating application into my website?   Thanks,       Lee
  8. Hmm, I've tried that and am having trouble with that form. I need to figure out three things that aren't happening at the moment: 1) check to see if each form has been filled out 2) send the results to my email lee@thesudanhouse.com Here's the code: [code]<?php if (isset($_POST["submit"])) { // Check for empty fields if ($_POST["email"] == "") {      die("Please fill out all fields"); } if ($_POST["name"] == "") {     die("Please fill out all fields"); } // And so on for each required field ...   $to = "lee@estateplanningschools.com";   $email = $_POST['email'] ;   $subject = "EPSA CAP2 Evaluation Results";   $name = $_POST['name'] ;   $classdateandtime = $_POST['classdateandtime'] ;   $instructors = $_POST['instructors'] ;   $address = $_POST['address'] ;   $city = $_POST['city'] ;   $state = $_POST['state'] ;   $zip = $_POST['zip'] ;   $phone = $_POST['phone'] ;   $Q1 = $_POST['Q1'] ;   $Q2 = $_POST['Q2'] ;   $Q3 = $_POST['Q3'] ;   $Q4 = $_POST['Q4'] ;   $Q5 = $_POST['Q5'] ;   $Q6 = $_POST['Q6'] ;   $Q7 = $_POST['Q7'] ;   $Q8 = $_POST['Q8'] ;   $Q9 = $_POST['Q9'] ;   $comments = $_POST['comments'] ;   $message = "From: $email    <strong>Name:</strong> $name    Class Date and Time: $classdateandtime    Instructors: $instructors    Address: $address    City: $city    State: $state    Zip: $zip    Phone Number: $phone      This learning Experience was: $Q1    Were the stated learning objectives met?: $Q2    If applicable, were prerequisites appropriate?: $Q3    Were program materials both accurate and effective?: $Q4    Did program materials contribute to the achievement of the learning Objectives?: $Q5    Was the time allotted to the learning experience appropriate?: $Q6    Were the facilities and/or the technological equipment appropriate?: $Q7    Were the handouts and advanced preparation materials satisfactory?: $Q8    Was the classroom facilitator's knowledge and experience satisfactory for the course material?: $Q9        Comments: $comments"; if (!mail($to, $subject, $message, $headers)) {     $error = "<p class=\"error\">Couldn't send message!</p>\n";   } } echo isset($error) ? $error : '';    header( "Location: http://www.estateplanningschools.com/thankyou.html" ); ?>[/code] 3) I am desiring to use this code to output the information into a .pdf file that is self-written by the script. Does that make sense? And from your experience, is it possible to accomplish? I've been looking at pdfLIB and feel that it is... Maybe you've got some experience with where to start? Thanks again...
  9. This isn't able to work for me yet. Am I placing it in the wrong part of the code? This is the part I'm talking about... <strong>Name:</strong> ...thanks [code] <?   $email = $_REQUEST['email'] ;   $name = $_REQUEST['name'] ;   $classdateandtime = $_REQUEST['classdateandtime'] ;   $instructors = $_REQUEST['instructors'] ;   $address = $_REQUEST['address'] ;   $city = $_REQUEST['city'] ;   $state = $_REQUEST['state'] ;   $zip = $_REQUEST['zip'] ;   $phone = $_REQUEST['phone'] ;   $Q1 = $_REQUEST['Q1'] ;   $Q2 = $_REQUEST['Q2'] ;   $Q3 = $_REQUEST['Q3'] ;   $Q4 = $_REQUEST['Q4'] ;   $Q5 = $_REQUEST['Q5'] ;   $Q6 = $_REQUEST['Q6'] ;   $Q7 = $_REQUEST['Q7'] ;   $Q8 = $_REQUEST['Q8'] ;   $Q9 = $_REQUEST['Q9'] ;   $comments = $_REQUEST['comments'] ;   mail( "myname@myname.com", "EPSA CAP2 Evaluation Results",    "From: $email    <strong>Name:</strong> $name    Class Date and Time: $classdateandtime    Instructors: $instructors    Address: $address    City: $city    State: $state    Zip: $zip    Phone Number: $phone      This learning Experience was: $Q1    Were the stated learning objectives met?: $Q2    If applicable, were prerequisites appropriate?: $Q3    Were program materials both accurate and effective?: $Q4    Did program materials contribute to the achievement of the learning Objectives?: $Q5    Was the time allotted to the learning experience appropriate?: $Q6    Were the facilities and/or the technological equipment appropriate?: $Q7    Were the handouts and advanced preparation materials satisfactory?: $Q8    Was the classroom facilitator's knowledge and experience satisfactory for the course material?: $Q9        Comments: $comments" ); header( "Location: http://www.estateplanningschools.com/thankyou.html" ); ?>[/code]
  10. Thanks for the help! Though I didn't think html could work within the <? and ?> of the php code? I tried it and the email came back with the <bold> </bold> tags inside the text of the email. Hmm... Thanks you anyhow...
  11. Thanks for the last response... I've changed the code to a much simpler, much easier way for me to understand. I just keep getting stuck on two more things: 1) I keep receiving this error in the code, although the form still sends.         [i]Warning: Cannot modify header information - headers already sent by (output started at /home/tltaylor/estateplanningschools-www/sendmail.php:2) in /home/tltaylor/estateplanningschools-www/sendmail.php on line 46 [/i] 2) Also, how do I format text within the php script (say, when I receive the email of the user input information, can I make some titles [b]BOLD[/b] when it comes to me in an email? Here's the new code: <title>sendmail.php</title> <?   $email = $_REQUEST['email'] ;   $name = $_REQUEST['name'] ;   $classdateandtime = $_REQUEST['classdateandtime'] ;   $instructors = $_REQUEST['instructors'] ;   $address = $_REQUEST['address'] ;   $city = $_REQUEST['city'] ;   $state = $_REQUEST['state'] ;   $zip = $_REQUEST['zip'] ;   $phone = $_REQUEST['phone'] ;   $Q1 = $_REQUEST['Q1'] ;   $Q2 = $_REQUEST['Q2'] ;   $Q3 = $_REQUEST['Q3'] ;   $Q4 = $_REQUEST['Q4'] ;   $Q5 = $_REQUEST['Q5'] ;   $Q6 = $_REQUEST['Q6'] ;   $Q7 = $_REQUEST['Q7'] ;   $Q8 = $_REQUEST['Q8'] ;   $Q9 = $_REQUEST['Q9'] ;   $comments = $_REQUEST['comments'] ;   mail( "myemail@mymail.com", "EPSA CAP2 Evaluation Results",   "From: $email   Name: $name   Class Date and Time: $classdateandtime   Instructors: $instructors   Address: $address   City: $city   State: $state   Zip: $zip   Phone Number: $phone     This learning Experience was: $Q1   Were the stated learning objectives met?: $Q2   If applicable, were prerequisites appropriate?: $Q3   Were program materials both accurate and effective?: $Q4   Did program materials contribute to the achievement of the learning Objectives?: $Q5   Was the time allotted to the learning experience appropriate?: $Q6   Were the facilities and/or the technological equipment appropriate?: $Q7   Were the handouts and advanced preparation materials satisfactory?: $Q8   Was the classroom facilitator's knowledge and experience satisfactory for the course material?: $Q9     Comments: $comments" ); header( "Location: http://www.estateplanningschools.com/thankyou.html" ); ?>
  12. The email supposed to return all of the form fields returns this information only: [i]From: www@host28.christianwebhost.com[/i] [i]Class Date and Locaion: EPSA CAP2 Evaluation Results[/i]   For some reason, I'm missing the correct variables to grab the information from the form, and return them in the email... Thanks thorpe... ------------------------------------------------------- <title>sendmail.php</title><?php $to = "myname@mysite.com"; $from = stripslashes($_POST['Name']); $subject = "EPSA CAP2 Evaluation Results".stripslashes($_POST['Subject']); $body = "Message from: $from\n\n".stripslashes($_POST['name']); $comments = "Comments:".stripslashes($_POST['comments']); $body = "Class Date and Locaion:".stripslashes($POST['classdateandlocation']); $Q1 = "Question 1".stripslashes($_POST['Q1']); $Q2 = "Question 2".stripslashes($_POST['Q2']); $Q3 = "Question 3".stripslashes($_POST['Q3']); $Q4 = "Question 4".stripslashes($_POST['Q4']); $Q5 = "Question 5".stripslashes($_POST['Q5']); $Q6 = "Question 6".stripslashes($_POST['Q6']); $Q7 = "Question 7".stripslashes($_POST['Q7']); $Q8 = "Question 8".stripslashes($_POST['Q8']); $Q9 = "Question 9".stripslashes($_POST['Q9']); $Q10 = "Question 10".stripslashes($_POST['Q10']); if (mail("$to","$from","$subject","$body","$Q1-Q10"))         echo nl2br("<b>Message Sent:</b>         To: $recipient         Subject: $subject Choices: $Q1,$Q2,$Q3,$Q4,$Q5,QQ6,$Q7,$Q8,$Q9,$Q10         Message: $comments");       else         echo "Message failed to send"; ?>
  13. Hey there ya'll...I'm trying to get this simple form together to be sent back to an email address. Can someone help me out with the correct coding? I keep running into problems! (here are two different pages: 1) the form page, and 2) the sendmail.php file the form requests to send the information Thank you... <form name="form1" method="post" action="sendmail.php">           <table width="600" height="700" border="0" align="center" cellpadding="5" cellspacing="0">             <tr>               <td width="391" height="30" align="right" valign="middle"> Class Date and Location :</td>               <td width="336"><input name="classdateandlocation" type="text" size="40">               </td>             </tr>             <tr>               <td height="30" align="right" valign="middle">Instructors :</td>               <td><input name="instructors" type="text" size="40">               </td>             <tr>               <td height="29" align="right" valign="middle">This learning Experience was :</td>               <td><p>                   <input type="radio" name="Q1" checked value="1">           1           <input type="radio" name="Q1" value="2">           2           <input type="radio" name="Q1" value="3">           3           <input type="radio" name="Q1" value="4">           4           <input type="radio" name="Q1" value="5">           5               </td>             </tr>             <tr>               <td height="29" align="right" valign="middle">Were the stated learning objectives met? :</td>               <td><p>                   <input type="radio" name="Q2" checked value="1">           1           <input type="radio" name="Q2" value="2">           2           <input type="radio" name="Q2" value="3">           3           <input type="radio" name="Q2" value="4">           4           <input type="radio" name="Q2" value="5">           5               </td>             </tr>             <tr>             <tr>               <td height="29" align="right" valign="middle"> If applicable, were prerequisites appropriate? :</td>               <td><p>                   <input type="radio" name="Q3" checked value="1">           1           <input type="radio" name="Q3" value="2">           2           <input type="radio" name="Q3" value="3">           3           <input type="radio" name="Q3" value="4">           4           <input type="radio" name="Q3" value="5">           5               </td>             </tr>             <tr>             <tr>               <td height="29" align="right" valign="middle"> Were program materials both accurate and effective? :</td>               <td><p>                   <input type="radio" name="Q4" checked value="1">           1           <input type="radio" name="Q4" value="2">           2           <input type="radio" name="Q4" value="3">           3           <input type="radio" name="Q4" value="4">           4           <input type="radio" name="Q4" value="5">           5               </td>             </tr>             <tr>             <tr>               <td height="46" align="right" valign="middle"> Did program materials contribute to the achievement of the learning Objectives? :</td>               <td><p>                   <input type="radio" name="Q5" checked value="1">           1           <input type="radio" name="Q5" value="2">           2           <input type="radio" name="Q5" value="3">           3           <input type="radio" name="Q5" value="4">           4           <input type="radio" name="Q5" value="5">           5               </td>             </tr>             <tr>             <tr>               <td height="29" align="right" valign="middle"><p>Was the time allotted to the learning experience appropriate? :</p></td>               <td><p>                   <input type="radio" name="Q6" checked value="1">           1           <input type="radio" name="Q6" value="2">           2           <input type="radio" name="Q6" value="3">           3           <input type="radio" name="Q6" value="4">           4           <input type="radio" name="Q6" value="5">           5               </td>             </tr>             <tr>               <td height="46" align="right" valign="middle"> Were the facilities and/or the technological equipment appropriate? :</td>               <td><p>                   <input type="radio" name="Q8" checked value="1">           1           <input type="radio" name="Q8" value="2">           2           <input type="radio" name="Q8" value="3">           3           <input type="radio" name="Q8" value="4">           4           <input type="radio" name="Q8" value="5">           5               </td>             </tr>             <tr>               <td height="46" align="right" valign="middle"> Were the handouts and advanced preparation materials satisfactory? :</td>               <td><p>                   <input type="radio" name="Q9" checked value="1">           1           <input type="radio" name="Q9" value="2">           2           <input type="radio" name="Q9" value="3">           3           <input type="radio" name="Q9" value="4">           4           <input type="radio" name="Q9" value="5">           5               </td>             </tr>             <tr>               <td height="46" align="right" valign="middle"><p>Was the classroom facilitator&rsquo;s knowledge and experience satisfactory for the course material?:</p></td>               <td><p>                   <input type="radio" name="Q10" checked value="1">           1           <input type="radio" name="Q10" value="2">           2           <input type="radio" name="Q10" value="3">           3           <input type="radio" name="Q10" value="4">           4           <input type="radio" name="Q10" value="5">           5               </td>             <tr>               <td height="120" align="right" valign="top">Comments:</td>               <td><textarea name="comments" cols="40" rows="6"></textarea>               </td>             </tr>             <tr>               <td height="30"><div align="right">Name : </div></td>               <td><input name="name" type="text" id="name" size="40"></td>             </tr>             <tr>             <tr>               <td height="30"><div align="right">Address : </div></td>               <td><input name="address" type="text" id="address" size="40"></td>             </tr>             <tr>               <td height="30"><div align="right">City : </div></td>               <td><input name="city" type="text" id="city" size="40"></td>             </tr>             <tr>               <td height="30"><div align="right">State : </div></td>               <td><input name="state" type="text" id="state" size="40"></td>             </tr>             <tr>               <td height="30"><div align="right">Zip : </div></td>               <td><input name="zip" type="text" id="zip" size="40"></td>             </tr>             <tr>               <td height="30"><div align="right">Phone : </div></td>               <td><input name="phone" type="text" id="phone" size="40"></td>             </tr>     <td height="31"></td>         <td><input type="submit" name="Submit"       value="Send">             <input type="reset" name="Reset"       value="Reset"></td>     </tr>           </table>     </form> --------------------------------------------------------------------------------------------------------------------- <title>sendmail.php</title><?php $to = "myname@mysite.com"; $from = stripslashes($_POST['Name']); $subject = "EPSA CAP2 Evaluation Results".stripslashes($_POST['Subject']); $body = "Message from: $from\n\n".stripslashes($_POST['name']); $comments = "Comments:".stripslashes($_POST['comments']) . " $body = "Class Date and Locaion:".stripslashes($POST['classdateandlocation']) . " $Q1 = "Question 1".stripslashes($_POST['Q1']); $Q2 = "Question 2".stripslashes($_POST['Q2']); $Q3 = "Question 3".stripslashes($_POST['Q3']); $Q4 = "Question 4".stripslashes($_POST['Q4']); $Q5 = "Question 5".stripslashes($_POST['Q5']); $Q6 = "Question 6".stripslashes($_POST['Q6']); $Q7 = "Question 7".stripslashes($_POST['Q7']); $Q8 = "Question 8".stripslashes($_POST['Q8']); $Q9 = "Question 9".stripslashes($_POST['Q9']); $Q10 = "Question 10".stripslashes($_POST['Q10']); if (mail("$to","$from","$subject","$body","$Q1","$Q2","$Q3","$Q4","$Q5","$Q6","$Q7","$Q8","$Q9","$Q10"))         echo nl2br("<b>Message Sent:</b>         To: $recipient         Subject: $subject Choices: $msg         Message: $comments");       else         echo "Message failed to send";   } ?>
×
×
  • 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.