Jump to content

siral3x

Members
  • Posts

    12
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

siral3x's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I don't receive any errors, but it won't send me the email...I don't know what else to do I have the actual form in 1 file and the processor in a 2nd file with the code as follows: form.html : <form action="process.php" method="post"> <table border=1> <tr> <tr> <td>First name:</td> <td align="center"><input type="text" name="name" size="15" maxlength="30"></td> </tr> <tr> <td>Last name:</td> <td align="center"><input type="text" name="last_name" size="15" maxlength="30"></td> </tr> <tr> <td>Address:</td> <td align="center"><input type="text" name="address" size="15" maxlength="30"></td> </tr> <tr> <td>City:</td> <td align="center"><input type="text" name="city" size="15" maxlength="30"></td> </tr> <tr> <td>State:</td> <td align="center"><input type="text" name="state" size="15" maxlength="30"></td> </tr> <tr> <td>Postal Code:</td> <td align="center"><input type="text" name="zip" size="15" maxlength="30"></td> </tr> <tr> <td>Country:</td> <td align="center"><input type="text" name="country" size="15" maxlength="30"></td> </tr> <tr> <td>E-mail:</td> <td align="center"><input type="text" name="mail" size="15" maxlength="30"></td> </tr> <tr> <td>Telephone:</td> <td align="center"><input type="text" name="tel" size="15" maxlength="30"></td> </tr> </table> <div align="center"><center><table border="0" width="480"> <tr> <td align="center"><input type="submit" value="Submit Order"></td> <td align="center"><input type="reset" value="Reset form"></td> </tr> </table> </center></div> and then process.php: <?php $to = "xxx@yahoo.com"; $subject = "Put your subject line here"; $tmp = array(); foreach($_POST as $fld => $val) if ($fld != 'submit') $tmp[] = $fld . ': ' . stripslashes($val); $body = implode("\are\n",$tmp) . "\are\n"; $headers = 'From: ' . $_POST['name'] . ' <' . $_POST['mail'] . '>'; mail($to,$subject,$body,$headers); echo "<h5>YOUR REQUEST HAS BEEN SENT! WE WILL GET BACK TO YOU SOON!</h5>"; ?> Like I said I receive no errors but it won't send me the email!!! Any solutions?? thx in advance ALEX
  2. OOPPSSS the code for form.html is: <form action="process.php" method="post"> <table border=1> <tr> <tr> <td>First name:</td> <td align="center"><input type="text" name="name" size="15" maxlength="30"></td> </tr> <tr> <td>Last name:</td> <td align="center"><input type="text" name="last_name" size="15" maxlength="30"></td> </tr> <tr> <td>Address:</td> <td align="center"><input type="text" name="address" size="15" maxlength="30"></td> </tr> <tr> <td>City:</td> <td align="center"><input type="text" name="city" size="15" maxlength="30"></td> </tr> <tr> <td>State:</td> <td align="center"><input type="text" name="state" size="15" maxlength="30"></td> </tr> <tr> <td>Postal Code:</td> <td align="center"><input type="text" name="zip" size="15" maxlength="30"></td> </tr> <tr> <td>Country:</td> <td align="center"><input type="text" name="country" size="15" maxlength="30"></td> </tr> <tr> <td>E-mail:</td> <td align="center"><input type="text" name="mail" size="15" maxlength="30"></td> </tr> <tr> <td>Telephone:</td> <td align="center"><input type="text" name="tel" size="15" maxlength="30"></td> </tr> </table> <div align="center"><center><table border="0" width="480"> <tr> <td align="center"><input type="submit" value="Submit Order"></td> <td align="center"><input type="reset" value="Reset form"></td> </tr> </table> </center></div>
  3. OK, I'm DESPERATE, I get no errors but the date won't be emailed at all I have 2 files: form.html and process.php form.html <form action="process.php" method="post"> <table border=1> <tr> <tr> <td>First name:</td> <td align="center"><input type="text" name="$name" size="15" maxlength="30"></td> </tr> <tr> <td>Last name:</td> <td align="center"><input type="text" name="$last_name" size="15" maxlength="30"></td> </tr> <tr> <td>Address:</td> <td align="center"><input type="text" name="$address" size="15" maxlength="30"></td> </tr> <tr> <td>City:</td> <td align="center"><input type="text" name="$city" size="15" maxlength="30"></td> </tr> <tr> <td>State:</td> <td align="center"><input type="text" name="$state" size="15" maxlength="30"></td> </tr> <tr> <td>Postal Code:</td> <td align="center"><input type="text" name="$zip" size="15" maxlength="30"></td> </tr> <tr> <td>Country:</td> <td align="center"><input type="text" name="$country" size="15" maxlength="30"></td> </tr> <tr> <td>E-mail:</td> <td align="center"><input type="text" name="$mail" size="15" maxlength="30"></td> </tr> <tr> <td>Telephone:</td> <td align="center"><input type="text" name="$tel" size="15" maxlength="30"></td> </tr> </table> -------------- then I have process.php <?php $to = "xxx@yahoo.com"; $subject = "Put your subject line here"; $tmp = array(); foreach($_POST as $fld => $val) if ($fld != 'submit') $tmp[] = $fld . ': ' . stripslashes($val); $body = implode("\r\n",$tmp) . "\r\n"; $headers = 'From: ' . $_POST['name'] . ' <' . $_POST['mail'] . '>'; mail($to,$subject,$body,$headers); echo "<h5>YOUR REQUEST HAS BEEN SENT! WE WILL GET BACK TO YOU SOON!</h5>"; ?> I receive no errors but nothing works..I don't receive the email with the collected data. NOW what?? THX in advance ALEX
  4. code for "process.php" : <?php $to = "xxx@hotmail.com" $subject = "Put your subject line here"; $tmp = array(); foreach($_POST as $fld => $val) if ($fld != 'submit') $tmp[] = $fld . ': ' . stripslashes($val); $body = implode("\r\n",$tmp) . "\r\n"; $headers = 'From: ' . $name . ' <' . $mail . '>'; mail($to,$subject,$body,$headers); echo "<h5>YOUR REQUEST HAS BEEN SENT! WE WILL GET BACK TO YOU SOON!</h5>"; ?> "Parse error: parse error, unexpected T_VARIABLE in /process.php" I don't get it, it worked fine with my php version...now I uploaded the files on the web hosting server and I get this error??? What to do?? thx Alex
  5. Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your YEP...I need sendmail for sure!!! I"M ALL SET!! THX A LOT KEN!!! This forum is awesome!
  6. Ha, I noticed that it's 1 AM here line 9: $headers = 'From: ' . $name . ' <' . $mail . '>'; Undefined variable: name Undefined variable: mail This one I'm clueless
  7. Parse error: parse error in c:\program files\easyphp1-8\www\process.php on line 2 Line 2 would be: $to = "xxx@yahoo.com", Is it because I don't have sendmail installed?
  8. "they will all be imput" is all I needed to know!!! My process.php file should look like this???? : <?php @extract($_POST); $name = stripslashes($name); $last_name = stripslashes($last_name); $address = stripslashes($address); $city = stripslashes($city); $state = stripslashes($state); $zip = stripslashes($zip); $country = stripslashes($country); $mail = stripslashes($mail); $tel = stripslashes($tel); $pen = stripslashes($pen); $hemp = stripslashes($hemp); $hbracelet = stripslashes($hbracelet); $key_chain = stripslashes($key_chain); $earrings = stripslashes($earrings); $zipper = stripslashes($zipper); $s_beads = stripslashes($s_beads); $to = "xxx@yahoo.com", $subject = "Put your subject line here"; $tmp = array(); foreach($_POST as $fld => $val) if ($fld != 'submit') $tmp[] = $fld . ': ' . stripslashes($val); $body = implode("\r\n",$tmp) . "\r\n"; $headers = 'From: ' . $name . ' <' . $mail . '>'; mail($to,$subject,$body,$headers); ?> Did I got it right? OR I don't have to declare all the var??? It will auto imput them?
  9. SO I need like : foreach($_POST as $fld => $name) if ($fld != 'submit') // or whatever your submit button is named $tmp[] = $fld . ': ' . stripslashes($name); foreach($_POST as $fld => $last_name) if ($fld != 'submit') // or whatever your submit button is named $tmp[] = $fld . ': ' . stripslashes($last_name); foreach($_POST as $fld => $address) if ($fld != 'submit') // or whatever your submit button is named $tmp[] = $fld . ': ' . stripslashes($address); etc.. etc.. CORRECT??? Then : $body = implode("\r\n",$tmp) . "\r\n"; $headers = 'From: ' . $name . ' <' . $mail . '>'; mail($to,$subject,$body,$headers); And that's it?? Sorry for all these questions, but I'm very new to php.
  10. In your example where do I add the extra $Last_name,$address, $city variables to mail them??? or how do I mail all those vars? thx a lot!!!
  11. I got the following code: <?php @extract($_POST); $name = stripslashes($name); $last_name = stripslashes($last_name); $address = stripslashes($address); $city = stripslashes($city); $state = stripslashes($state); $zip = stripslashes($zip); $country = stripslashes($country); $mail = stripslashes($mail); $tel = stripslashes($tel); $pen = stripslashes($pen); $hemp = stripslashes($hemp); $hbracelet = stripslashes($hbracelet); $key_chain = stripslashes($key_chain); $earrings = stripslashes($earrings); $zipper = stripslashes($zipper); $s_beads = stripslashes($s_beads); mail('xxx@yahoo.com,$name,$last_name,$address,$city,$state,$zip,$country,$mail,$tel,$pen,$hemp,$hbracelet,$key_chain,$earrings,$zipper,$s_beads, "From: $name <$mail>"); header("location:form.php"); ?> IS THIS going to work?? I mean, am I going to recive all the info in those fields or not?? I'm lost...I'm not sure if I'm on the right track. thx Alex
×
×
  • 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.