Jump to content

bufhal

Members
  • Posts

    30
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bufhal's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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.
×
×
  • 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.