Results 1 to 6 of 6

Thread: form help

  1. #1
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default form help

    Heres the php end of the form:

    Code:
    <?php
    Error_Reporting(E_ALL & ~E_NOTICE);
    
     while ($request = current($_REQUEST)) {
     	if (key($_REQUEST)!='jon101@optonline.net') {
    		$pre_array=split ("&777&",  $request);
    		
    		$post_vars[key($_REQUEST)][0]=preg_replace ("/<[^>]*>/", "", $pre_array[0]);
    		$post_vars[key($_REQUEST)][1]=preg_replace ("/<[^>]*>/", "", $pre_array[1]);
    	}
    	next($_REQUEST);
    }
    
    
    
    reset($post_vars);
    
    
    $subject="From ".$post_vars['your_name'][0] ;
    $headers= "From: ".$post_vars['your_email'][0] ."\n";
     $headers.='Content-type: text/html; charset=iso-8859-1';
     $message='';
      while ($mess = current($post_vars)) {
      	if ((key($post_vars)!="i") && (key($post_vars)!="your_email") && (key($post_vars)!="your_name")) {
    
    	 	$message.="<strong>".$mess[1]."</strong>&nbsp;&nbsp;&nbsp;".$mess[0]."<br>";
    	}
    	next($post_vars);
     }
    
    mail($_REQUEST['jon101@optonline.net'], $subject,  "
    <html>
    <head>
     <title>Contact letter</title>
    </head>
    <body>
    <br>
      ".$message."
    </body>
    </html>" , $headers);
    echo ("Your message was successfully sent!");
    
    ?>
    <script>
    	resizeTo(300, 300);
    </script>
    For one reason or another im not getting the emails.... my emails i jon101...

    did i plug it in the wrong spot?


    Thanks!
    Last edited by thetestingsite; 11-05-2007 at 02:03 AM. Reason: added code tags

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    This part makes no sense to me:

    Code:
    mail($_REQUEST['jon101@optonline.net'], $subject, ...
    Do you have a form field named jon101... or is it the email address. If the latter, take off the $_REQUEST[''] portion of it and it should work.

    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    thanks, ill give it a shot.

  4. #4
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    so should it look like this:

    mail('jon101@optonline.net', $subject, "

    ?

    thanks!

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    yes, where jon101... is the email address that the mail will be sent to
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Jan 2007
    Posts
    181
    Thanks
    5
    Thanked 3 Times in 3 Posts

    Default

    Thanks so much... greatly appreciated.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •