Jump to content

bufhal

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Everything posted by bufhal

  1. Thanks for taking a look. Do you mean the menu items need to all be hard-coded, for instance: href="/hostadapter.html change to: href="http://www.attotech.com/hostadapter.html"
  2. Thanks SharkBait. The site is http://www.attotech.com We have a "dowloads" section for our drivers and our main menu (one on homepage and another for all other pages) has downlaod as a link. I put the https url in the menu pointing at the downlaods section and it works, but when I click on any other page, (without the https), that page loads with the https ext. Can you please tke a look? I appreciate your help.
  3. Hello out there; hope someone can help me out. We installed SSL on our server and made the URL's on a secure sections with a "https" extension. All is well except when a user clicks to another area of the site that is not secured, it still keeps the https. Does this have to do with PHP sessions and is ther an easy fix. I appreciate any advise/direction..
  4. well Good Golly Ms. Molly  it works!!! Thank you..it works beautifully!. I am going to study these posts and script to absorb! Thank you very very much gmwebs! I really appreciate your help.
  5. Mail with subject: This is the subject addressed to: someone.comwas succesfully sent... The body follows below. This is the message
  6. whould that be caused by the original link: E-mail: <a href="mail4.php?email_to=mkt"><img src="images/Ed_email.gif" width="152" height="14" border="0"></a> It goes to the right page but not passing the correct value?
  7. yesy it did: Array ( [mkt] => mkt@attotech.com [dd] => dd@email.com [rpec] => gzakes@attotech.com [gz] => mkt@attotech.com ) The value of email is - mktThe value of email_addr is - mkt@attotech.com
  8. Hi gmwebs; just got back in and tried it. Still no emails I commented out the lines: [code]<?php $emails = array( 'mkt' => 'mkt@attotech.com', 'dd' => 'dd@email.com', 'rpec' => 'gzakes@attotech.com', 'gz' => 'mkt@attotech.com' ); $email = $HTTP_POST_VARS['email']; $email_addr = $emails[$email]; //See? We need to find the email address that $email refers to in the array... //print_r($emails); //echo the value of the array //echo "The value of email is - " . $email; //let's see what the value of $email is //echo "The value of email_addr is - " . $email_addr; //let's see what the value of $email_addr is //exit(); //end the script to see the output if (!empty($email) && in_array($email, $emails)) { /* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */ $subject = $HTTP_POST_VARS['subject']; $message = $HTTP_POST_VARS['message']; /* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */ if ($subject == "") { echo "<h4>No subject</h4>"; echo "<a href='javascript:history.back(1);'>Back</a>"; } /* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */ elseif (mail($email_addr,$subject,$message)) { echo "<h3>Thank you for sending email</h3>"; } else { echo "<h4>Can't send email to $email</h4>"; } } ?>[/code]
  9. Array ( [mkt] => mkt@tech.com [dd] => dd@email.com [rpec] => gz@tech.com [gz] => mkt@tech.com ) The value of email is - mktThe value of email_addr is -
  10. Hi; I took the $ variable off echo. When I now submit, no email is sent and the mail2.php page shows "mkt" intead of echo "<h3>Thank you for sending email</h3>";
  11. getting a parse error: Parse error: parse error, unexpected T_VARIABLE in /home/attonet/www/atto.net/mail2.php on line 311 307  /* All form fields are automatically passed to the PHP script through the array 308  $HTTP_POST_VARS. */ 309  $email_addr = $emails['email']; 310  $subject = $HTTP_POST_VARS['subject']; 311  $message = $HTTP_POST_VARS['message']; $echo $email_addr; //let's see what the value of $email_addr is exit(); //end the script to see the output
  12. Thank you for hanging in there with me.  Still not sending email. Here is what I have for the three files. have this for link: E-mail: [code]<a href="mail4.php?email_to=mkt"><img src="images/Ed_email.gif" width="152" height="14" border="0"></a>[/code] mail4.php: [code]<?php $email = $HTTP_GET_VARS['email_to']; //Get the value of the email_to variable in the gif. Might need to use $HTTP_GET_VARS instead of $_GET but try this first ?> <form action="mail2.php" method="POST">    <input type="hidden" name="email" value="<?php echo $email; ?>"> <p><b>Subject</b><br>    <input type="text" name="subject" size=50>    <br><br> <b>Message</b><br> <textarea cols=40 rows=10 name="message"></textarea><br><br> <input type="submit" value=" Send "> </form> <br><br> <hr> </body></center> </html> [/code] mail2.php: [code]<?php $emails = array( 'mkt' => 'mkt@tech.com', 'dd' => 'dd@email.com', 'rpec' => 'gz@tech.com', 'gz' => 'mkt@tech.com' ); if (!empty($_GET['email_to']) && in_array($_GET['email_to'], $emails)) {    if (mail(  )) {       echo 'Email sent';       exit();    } } ?> <?php /* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */ $email = $HTTP_POST_VARS['email']; $subject = $HTTP_POST_VARS['subject']; $message = $HTTP_POST_VARS['message']; /* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */ if ($subject == "") {   echo "<h4>No subject</h4>";   echo "<a href='javascript:history.back(1);'>Back</a>"; } /* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */ elseif (mail($email,$subject,$message)) { echo "<h3>Thank you for sending email</h3>"; } else {   echo "<h4>Can't send email to $email</h4>"; } ?>  [/code]
  13. absolutely, I appreciate your help. Throughout our website there soon to be multiple email gif links that, when clicked, will bring up the form page mail4.php. The link goes to the mail4.php page but thats all it does. It should recognise a variable in the array. As of now, when someone clicks the form submit, it is going to the mail2.php elseif, which I thought I correctly fixed(It had my email in it and I would recieve the form results, however, it should not reach the elseif statement if working correctly and someone fills out both form fields. I know this is overly complicated but the whole idea is to have the 50-70 emails on our site replaced with gif's which will offer the form. Thank you, I hope this clarifies somewhat. I am learning on the fly mand appreciate your help and patience.
  14. [quote]Also, in mail2.php on the elseif line, should it not be $email and not $emails?[/quote] I switched to $email, still no dice. [quote]Is there a form that is included in mail4.php? If there is, you would need to include the value of the email address which is derived from the array in mail4.php as a hidden value, or you would need to use session variables.[/quote] Sorry, gmwebs, not quite sure how to do this.
  15. Thanks for the reply. This is the form on the mail4.php page: [code]<form action="mail2.php" method="POST">   <p><b>Subject</b><br>   <input type="text" name="subject" size=50>   <br><br> <b>Message</b><br> <textarea cols=40 rows=10 name="message"></textarea><br><br> <input type="submit" value=" Send "> </form>[/code]
  16. I am sorry, upon further testing I was wrong. This is not working correctly. Can you please take a look and see why the "thank you" page code will not grab the array email specified on the first page. Thank you again in advance. [b]The page with the email gif link is first:[/b] E-mail: <a href="mail4.php?email_to=mkt"><img src="images/Ed_email.gif" width="152" height="14" border="0"></a> [b]That email link should grab the correct email address from the array on "mail4.php":[/b] [code]<?php $emails = array( 'mkt' => 'mkt@tech.com', 'dd' => 'dd@email.com', 'rpec' => 'gz@tech.com', 'gz' => 'mkt22@tech.com' ); if (!empty($_GET['email_to']) && in_array($_GET['email_to'], $emails)) {   if (mail(  )) {       echo 'Email sent';       exit();   } } ?> [/code] The "thank you" page, "mail2.php" that actually sends the email is not grabbing the email address from the array. I left the comments in [code]<?php /* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */ $email = $HTTP_POST_VARS['email']; $subject = $HTTP_POST_VARS['subject']; $message = $HTTP_POST_VARS['message']; /* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */ if ($subject == "") {   echo "<h4>No subject</h4>";   echo "<a href='javascript:history.back(1);'>Back</a>"; } /* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */ elseif (mail($emails,$subject,$message)) { echo "<h3>Thank you for sending email</h3>"; } else {   echo "<h4>Can't send email to $email</h4>"; } ?>[/code]
  17. Thank you for ALL your help, gmwebs. All set. I appreciate it...
  18. trying to find what is causing Parse error <?php $emails = array( 'gz' => 'gz@attotech.com', 'dd' => 'dd@email.com', 'rpec' => 'rpec@email.com', 'mkt' => 'mkt@email.com' ) if (!empty($_GET['email_to']) && in_array($_GET['email_to'], $emails)) {    if (mail(  )) {       echo 'Email sent';       exit();    } } ?>
  19. there are multiple email links, some people/departments have several emails within the site but one image per should d the trick. Your code makes sense, the email must be stored within the php array so it cannot be found/viewed.. I will try this and again thank you. I will let you know..
  20. I have a question you may think is dumb, I am trying to understand the array. When I click on the image, it brings the form up and when I fill out and submit, it goes to the first entry(recipient) in the array, gz@email.com. Since there are 15-20 emails I need to enter, how can the image links know which email in the array to "choose" when it is clicked? I am learning this on the fly and appreciate your patience and hanging in there with me.
  21. I think the image link syntax is wrong, . My last post contains all the code, the first for the form page and the second for the webpage email image link.
  22. Hi; Still attempting to wrap some PHP around "images of the email recipient's address" that, when clicked will go to a form page. The form page has a subject and a messagebox. When a visitor fills in those two boxes and submits, the information will go to the email address. I am stuck. Please foffer some assistance. I appreciate any help. [b]Form Page:[/b] [code]<?php $emails = array('gz@email, 'dd@email.com' , 'rpec@email.com' , 'mkt@email.com'); if (!empty($_GET['email_to']) && in_array($_GET['email_to'], $emails)) {   if (mail(  )) {       echo 'Email sent';       exit();   } } ?> [/code] <center> <body> <hr><br> <h2>Please email us...</h2> <br><br> [code]<form action="mail2.php" method="POST"> <p><b>Subject</b><br> <input type="text" name="subject" size=50> <br><br> <b>Message</b><br> <textarea cols=40 rows=10 name="message"></textarea><br><br> <input type="submit" value=" Send "> </form>[/code]<br><br> <hr> </body></center> </html> [b]Email link with image:[/b] <map name="Map"> <area shape="rect" coords="0,-2,153,14" href="mail4.html"> </map> <a href="?email_to=" img src="images/Ed_email.gif" width="152" height="14" border="0" usemap="#Map"> </a>
  23. thank you for the info. Our company decided to switch tactics. Instead of a dropdown, they want this to work as follows. A person on a page of the site clicks on an email gif that contains the link to this form. The persons name will show in a box on this page (code below) and when the form is filled out and submitted it will go automatically to that email. I am somewhat stuck here. In addition to this code, the actual clickable gif needs to contain a variable to fill in the box on the form. Please let me know how I can accomplsh this. Thank you. [code]<?php $emails = array(    0 => 'et@email.com',    1 => 'dd@email.com' ,    2 => 'rpec@email.com' ,    3 => 'mkt@email.com' ,   ); if (!empty($_POST['email_to']) && in_array($_POST['email_to'], $emails)) {    if (mail(  )) {       echo 'Email sent';       exit();    } } ?> [/code] <center> <body> <hr><br> <h2>Please email us...</h2> <br><br> [code]<form action="mail2.php" method="POST">   <p><b>Subject</b><br>   <input type="text" name="subject" size=50>   <br><br>   <br><br> <b>Message</b><br> <textarea cols=40 rows=10 name="message"></textarea> <input type="submit" value=" Send "> </form> [/code] </body></center> </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.