oki so ive designed my form and all with frontpage and ive added a simple script wich is supposed to send email to my account when someone hits submit , but i get no email.....i hit submit i go to my confermation page but i recieve no email , i checked my email adress three times , it is the correct one..... ?

and what i really want is a way to have the submitted text be stored as a text file on my web server and that it is sent to me by email....

and i was wondering the reason i dont get any mail, is it because i use a hotmail account , should i use another account ?

    Why don't you show us the form and the php script you are using?

      <?php

      $MailToAddress = "myemail"; // your email address
      $redirectURL = "mysite"; // the URL of the thank you page.

      optional settings

      $MailSubject = "Contact Form"; // the subject of the message you will receive
      $MailToCC = ""; // CC (carbon copy) also send the email to this address

      (leave empty if you don't use it)

      in the $MailToCC field you can have more then one e-mail address like "d@web4future.com,

      b@web4future.com, c@web4future.com"

      If you are asking for an email address in your form, you can name that input field "email".

      If you do this, the message will apear to come from that email address and you can simply click

      the reply button to answer it.

      You can use this scirpt to submit your forms or to receive orders by email.

      You need to send the form as POST!

      If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box

      or checkbox as "name[]" instead of just "name"

      you must also add "multiple" at the end of the tag like this: <select name="myselect[]"

      multiple>

      and the same way with checkboxes

      This script was made by George A. & Calin S. from Web4Future.com

      There are no copyrights in the e-mails sent and we do not ask for anything in return.

      DO NOT EDIT BELOW THIS LINE ============================================================

      ver. 1.2

      $Message = "";
      if (!is_array($HTTP_POST_VARS))
      return;
      reset($HTTP_POST_VARS);
      while(list($key, $val) = each($HTTP_POST_VARS)) {
      $GLOBALS[$key] = $val;
      if (is_array($val)) {
      $Message .= "<br><b>$key:</b> ";
      foreach ($val as $vala) {
      $vala =stripslashes($vala);
      $Message .= "$vala, ";
      }
      $Message .= "<br>";
      }
      else {
      $val = stripslashes($val);
      if (($key == "Submit") || ($key == "submit")) { }
      else { if ($val == "") { $Message .= "$key: - <br>"; }
      else { $Message .= "<b>$key:</b> $val<br>"; }
      }
      }
      } // end while
      $Message = "\n<font face=verdana size=2>".$Message;
      mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1

      \r\nFrom: ".$email."\r\nBCc: ".$MailToCC);
      header("Location: ".$redirectURL);
      ?>

        I would try something simple like this:

        <?php
        // Where email is sent
        $to = 'you@domain.com'; 
        // From address
        $from = 'Contact Form<no-reply@domain.com>' . "\r\n"; 
        // page visitor is sent after email is sent
        $redirectURL = 'thanks.html'; 
        // subject of the message
        $subject = 'Email Message from Your Web site'; 	
        // start the message
        $message = 'This message was sent via the form on your web site:' . "\n";
        $message .= '---------------------------------------------------' . "\n";
        // loop through posted values and add them to the message:
        foreach($_POST as $key=>$value) 
        {
        	$message .= $key . ': ' . $value . "\n";
        }
        
        // send the email
        $send = mail($to, $subject,$message, $from);
        
        // redirect the user:
        $redirect = header('Location: ' . $redirectURL);
        exit;
        ?>
        
          12 days later

          I am able to get the multiple selections to select but when I get the e-mail all it says is:

          Type: ARRAY

          I'm still pretty new to php and need a little help. Here's the part of the code:

          	$msg.="1. Type: ".$_POST['type']."<br>\n";
          	$msg.="2. Name: ".$_POST['nume']."<br>\n";
          	$msg.="3. Company: ".$_POST['company']."<br>\n";
          	$msg.="4. E-mail: ".$_POST['email']."<br>\n";
          	$msg.="5. Phone: ".$_POST['phone']."<br>\n";
          	$msg.="6. Web: ".$_POST['website']."<br>\n";
          	$msg.="7. Message: ". $_POST['mesaj']."<br>\n";
          	mail( $to, $subject, $msg,"From:".$_POST['nume']." <".$_POST['email'].">\nX-Sender: <".$_POST['email'].">\nX-Priority: 1\nReturn-Path: <".$_POST['email'].">\nContent-Type: text/html; charset=iso-8859-1\n" );
          	echo '<table border= "0" cellpadding = "0" cellspacing="0" width="450" class="contact_us"><tr><td><div align=center class="contact"><table align=center><tr><td height=280>';
          	echo '<p class="sent_message">'.$sent_message.'</p></td></tr></table></div></td></tr></table>';
          	}
          else
          	{
          	?>
          	<table width="450" class="contact_us" cellpadding="0" cellspacing="0"><tr><td><div class="contact">
          	<?php echo $text_string ?><br><font size="1" face="Geneva, Arial, Helvetica, sans-serif">
          
          	<?php echo $small_text ?></font><br><br>
          	  <form name="form1" method="post" action= <?php echo basename($PHP_SELF); ?> >
          	  <table width=100% cellspacing="0" class="form_fonts">
                  <tr>
                 <td valign="top">What Are You Interested In?<br>
                 <font color="#FF0000">(select all that apply)</font></td>
                 <td>
                              <select size="4" name="type[]" multiple>
                              <option>Banner Advertising</option>
                              <option>Dedicated Event Page</option>
                              <option>Featured Venue Marketing</option>
                              <option>Featured Event Marketing</option>
                              <option>On Page Audio Advertising</option>
                              <option>On Page Video Advertising</option>
                              <option>Myspace Marketing</option>
                              <option>E-Mail Campaign</option>
                              <option>Service Provider Directory</option>
                              </select></td>

            Oh, it is a multiple select box?

            Then the result it will produce IS an arry of items. Even if only one item is selected.

            SO the fix is to either use a regular select box, and get rid of the "[]" square braces in the select name...

            OR, you will have to loop through all the values selected and add them EACH to the email messsage...

              How do I loop it through all the values? Do I add a name to each option? Any examples?

                damnit i still dont get my email..... do i need something special ?

                  How many people are asking questions here 2 seperate people or one with two handles, cause one is getting email and has problems with a multiple select box and another has a ready made form that doesn't work, I think. Did the one with the email that doesn't send bother to try RodneyH's code?

                    i tried rodneys code with my form , i do redirect but i recieve no email.... =/

                      Write a Reply...