Jump to content

reece

Members
  • Posts

    15
  • Joined

  • Last visited

About reece

  • Birthday 03/18/1990

Profile Information

  • Gender
    Not Telling
  • Location
    United Kingdom

reece's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. No no sorry I just upload it to a live server.
  2. [uPDATE] Never mind, the problem with the secondary email was that my webhost only allows PHP scrips to send emails to addresses on the same server. Thanks again for your help!
  3. Oh right I see, thanks again One last thing I am trying to do with my form (don't have to reply to this if you don't want - Ill let u get off ) however I was wondering how I can simultaneously send a confirmation email out to the person who filled in the form. Currently it only sends as usual. <?php session_start(); $to = "[email protected]"; $subject = "MEMBER SIGNUP"; $name = $_REQUEST['name']; $nickname = $_REQUEST['nickname']; $email = $_REQUEST['email']; $steamid = $_REQUEST['steamid'] ; $skype = $_REQUEST['skype']; $moreinfo = $_REQUEST['moreinfo']; $message = "Name: ".$name."\n"; $message .= "Nickname: ".$nickname."\n"; $message .= "Email: ".$email."\n"; $message .= "Steam ID: ".$steamid."\n"; $message .= "Skype: ".$skype."\n"; $message .= "More Info: ".$moreinfo."\n"; $headers = "From: $email"; $sent = mail($to, $subject, $message, $headers); $confirmsubject = "SIGNUP SENT"; $confirmmessage = "Text here"; $confirmemail = "[email protected]"; $confirmheaders = "From: $confirmemail"; mail($email, $confirmsubject, $confirmmessage, $confirmheaders); if($sent) { $_SESSION['sessionname'] = $name; header( 'Location: thankyou.php' ); } else { header( 'Location: ../signup' ); } ?>
  4. Sorry sorry, I thought that was a variable called $SESSION lol, Its 5am here so I need some sleep ha ha. So many dollar signs I'm new to PHP and have never used that command before. Would that cookie just stay in the browser till it was closed (which would be fine, I'm just curious)? P.s. PHP is fun
  5. Sorry, I'm confused, I thought the session_start(); would enter all variables into a session. How do you enter the variables into it?
  6. Thanks again for taking the time to help me! Script <?php session_start(); $to = "[email protected]"; $subject = MEMBER SIGNUP"; $name = $_REQUEST['name'] ; $nickname = $_REQUEST['nickname'] ; $email = $_REQUEST['email'] ; $steamid = $_REQUEST['steamid'] ; $skype = $_REQUEST['skype'] ; $moreinfo = $_REQUEST['moreinfo'] ; $message = "Name: ".$name."\n"; $message .= "Nickname: ".$nickname."\n"; $message .= "Email: ".$email."\n"; $message .= "Steam ID: ".$steamid."\n"; $message .= "Skype: ".$skype."\n"; $message .= "More Info: ".$moreinfo."\n"; $headers .= "From: $email"; $sent = mail($to, $subject, $message, $headers) ; if($sent) {header( 'Location: thankyou.php' ) ;} else {header( 'Location: ../signup' ) ; } ?> thankyou.php <?php echo $name;?> What am I doing wrong, the name does not show in the thankyou.php?
  7. Ok, one more question Is it possible to recall a variable from a previous php file or form? I.e. When my form is completed, it opens up thankyou.php which has the script <?php $name = $_REQUEST['name'] ; echo $name; ?> but it does not seem to be able to get the information from the form.
  8. Thank you VERY MUCH!!! Very much appreciated!!! : )))))))))))))))
  9. Hey thanks Love2c0de thank you very much for your reply! I've just rewrote the whole script and used $_REQUEST instead of $_POST and it seemed to have done the trick. Also using the same variable e.g. $MESSAGE_BODY didn't seem to work to well either as it just ended up posting the last version of it in the code so I just wrote a var ($message) to include all of the individual ones. However I now have another question, do you know how i can enter each variable within my $message variable on a new line in my email? $message = "NAME: $name, NICKNAME: $nickname, EMAIL: $email, STEAMID: $steamid, SKYPE: $skype, MOREINFO: $moreinfo"; I.e. So $name will be on one line and $nickname on another? Thanks
  10. Hi. Could someone please have a quick check over my PHP code to collect and send data from a HTML form to an email address, as It does not seem to be sending out the email. <?php $ToEmail = '[email protected]'; $EmailSubject = 'MEMBER SIGNUP'; $mailheader = 'From: [email protected]'."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "Full Name: ".$_POST["fname"].""; $MESSAGE_BODY = "Nickname: ".$_POST["nickname"].""; $MESSAGE_BODY .= "Email: ".$_POST["email"].""; $MESSAGE_BODY .= "SteamID: ".$_POST["steamid"].""; $MESSAGE_BODY .= "Skype: ".$_POST["skype"].""; $MESSAGE_BODY .= "More Info: ".nl2br($_POST["moreinfo"]).""; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader); ?> Thanks, Reece
×
×
  • 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.