Jump to content

pgrevents

Members
  • Posts

    84
  • Joined

  • Last visited

    Never

Everything posted by pgrevents

  1. I have been having problems with this code for a couple of days. I have an activation email that gets sent to the user and one to me saying someone has registered. the one to me works fine. My host says that i have to use the -f command before the email address that its from. Here is my code that I am having problems with <?php $activation = $_GET['activation']; $fname = $_GET['fname']; $from_email = "info@pgrevents.co.uk"; $from_name = "PGR Events"; $emaila = "info@pgrevents.co.uk"; //senders e-mail adress $email = $_GET['email']; //recipient $mail_body = " <html> <body> <p align=\"center\"><img src=\"http://www.pgrevents.co.uk/images/pgrlogo.png\" alt=\"PGR EVENTS\" width=\"395\" height=\"196\" /></p> <p>Thank you ".$fname.",</p> <p>You are now registered with PGR Events before you have access to this site you must first confirm your email address. You can do this by clicking the link below or copying and pasting the link into your browser.</p> <p> </p> <br /><p><a href=\"http://www.pgrevents.co.uk/?display=activate&code=".$activation ."\">CLICK HERE TO CONFIRM YOUR EMAIL ADDRESS</a></p> <p> </p> <p>if the above link does not work copy and paste the below link</p> <p>http://www.pgrevents.co.uk/?display=activate&code=".$activation ."</p> <p> </p> <p>Thank you for your interest in PGR Events</p> <p> </p> <hr /> <p>**This is an Automatic Email** The information in this email and attachments is confidential and intended for the sole use of the addressee(s). Access, copying, disclosure or re-use, in any way, of the information contained in this email and attachments by anyone other than the addressee(s) is unauthorized. If you have received this email in error, please return it to the sender and highlight the error.<br /> <br /> We accept no legal liability for the content of the message. Any opinions or views presented are solely the responsibility of the author and do not necessarily represent those of PGR Events </body> </html> \n "; //mail body $subject = "Email Verification Code"; //subject $user = "donotreply@pgrevents.co.uk"; $headers .= "To: \"".$fname."\" <\"".$email."\">\n"; $headers .= "MIME-Version: 1.0\n"; $headers .= "Content-Type: text/HTML; charset=ISO-8859-1\n"; //optional headerfields mail("$subject", "$mail_body", "$headers", "From: $from_name", "$-finfo@pgrevents.co.uk"); //mail command // the script above does not work /// the below mail is the one that works note the -f$user command mail("info@pgrevents.co.uk", "New User Registered","New User Registered Code = $activation","From: $user", "-f$user" ); header('Location:http://www.pgrevents.co.uk/?display=registration&type=complete'); ?> does anyone have any ideas? thanks in advance
  2. basicly the user will be entering into a normal text area form element and it recreates exactly what the user has typed???
  3. What I am trying to do is basicly (hopefully) is i am creating a bio part for my website and it will be saving to a mysql database. What I want to recreate is how the user typed it in such as spaces and line breaks like <br/> etc. If the user hits enter and creates a new paragraph in essence i want the php to add the <br/> I hope in reading this you understand what I am trying to get across cause I dont lol Does anyone have any ideas cheers Paul
  4. What i am trying to do is a login script that when the email address in the query shows the activated status at no redirects to a page and if yes continue login. now i kinda know the php but not the mysql query. Heres how i think it would work 1. user logs in and sends post data to login.php 2. the email/username provided will be captured by $username 3. the mysql query searches database for that $username and colname'activated' 4a. if activated says no redirect to activate page 4b. if activated says yes continue log in ....... Is there a tutorial out there cause i have not found it yet. Or is my thinking so far past the line i cant see it any help would be greatly appreciated thanks peeps
  5. what i have came up with is <?php $activation = $_GET['activation']; $fname = $_GET['fname']; $from = "info@pgrevents.co.uk"; $Name = "PGR Events"; //senders name $email = "info@pgrevents.co.uk"; //senders e-mail adress $recipient = $_GET['email']; //recipient $mail_body = " <p align=\"center\"><img src=\"http://www.pgrevents.co.uk/images/pgrlogo.png\" alt=\"PGR EVENTS\" width=\"395\" height=\"196\" /></p> <p>Thank you ".$fname.",</p> <p>You are now registered with PGR Events before you have access to this site you must first confirm your email address. You can do this by clicking the link below or copying and pasting the link into your browser.</p> <p> </p> <br /><p><a href=\"http://www.pgrevents.co.uk/?display=activate&code=".$activation ."\">CLICK HERE TO CONFIRM YOUR EMAIL ADDRESS</a></p> <p> </p> <p>if the above link does not work copy and paste the below link</p> <p>http://www.pgrevents.co.uk/?display=activate&code=".$activation ."</p> <p> </p> <p>Thank you for your interest in PGR Events</p> <p> </p> <hr /> <p>**This is an Automatic Email** The information in this email and attachments is confidential and intended for the sole use of the addressee(s). Access, copying, disclosure or re-use, in any way, of the information contained in this email and attachments by anyone other than the addressee(s) is unauthorized. If you have received this email in error, please return it to the sender and highlight the error.<br /> <br /> We accept no legal liability for the content of the message. Any opinions or views presented are solely the responsibility of the author and do not necessarily represent those of PGR Events \n "; //mail body $subject = "Email Verification Code"; //subject $from = "info@pgrevents.co.uk"; $header = "nContent-Type: text/html; charset=iso-8859-1\n"; //optional headerfields mail($recipient, $subject, $mail_body, $header, "From: PGR Events", "-f$from"); //mail command header('Location:http://www.pgrevents.co.uk/?display=registration&type=complete'); ?> Could someone please have a look. If it does appear to be correct then it gives me more ammo to go back to my hsp with thanks again
  6. I got a response from my hosting provider that was better than other ones I have recieved. It is now stating that I need to use the -f command. I have no clue of what this is and I got given an example but dont know how to work it into my scrip can someone please oblige me with a fix? the example i got from my hsp is, <? $from = "thefromemailaddress@domain"; mail("recipient@", "Test mail from PHP mail","This is a test PHP Email","From: $from", "-f$from" ); print "Mail sent"; ?> I kind of understand how i might put it in but as I am sending a html email i need to set the from to a header adding in the charset etc and the from email address including the -f command. Many thanks for looking
  7. hi and thanks for your help. I have edited the script it and i have echoed the form and there are no emails it says the emails are getting sent. I have contacted my isp and they are sure it is a script problem here is my edited code can you please have a look and see if i have made any mistakes. <? $email = $_GET['email']; $activation = $_GET['activation']; $fname = $_GET['fname']; /* subject */ $subject = "PGR Events Activation Code"; /* message */ $message .= " <p align=\"center\"><img src=\"http://www.pgrevents.co.uk/images/pgrlogo.png\" alt=\"PGR EVENTS\" width=\"395\" height=\"196\" /></p> <p>Thank you ".$fname.",</p> <p>You are now registered with PGR Events before you have access to this site you must first confirm your email address. You can do this by clicking the link below or copying and pasting the link into your browser.</p> <p> </p> <br /><p>CLICK HERE TO CONFIRM YOUR EMAIL ADDRESS</p> <p> </p> <p>if the above link does not work copy and paste the below link</p> <p>http://www.pgrevents.co.uk/?display=activate&code=".$activation ."</p> <p> </p> <p>Thank you for your interest in PGR Events</p> <p> </p> <hr /> <p>**This is an Automatic Email** The information in this email and attachments is confidential and intended for the sole use of the addressee(s). Access, copying, disclosure or re-use, in any way, of the information contained in this email and attachments by anyone other than the addressee(s) is unauthorized. If you have received this email in error, please return it to the sender and highlight the error.<br /> <br /> We accept no legal liability for the content of the message. Any opinions or views presented are solely the responsibility of the author and do not necessarily represent those of PGR Events \n"; $headers .= "From: info@pgrevents.co.uk, PGR EVENTS \n"; $headers .= "To-Sender: \n"; $headers .= "X-Mailer: PHP\n"; $headers .= "X-Priority: 1\n"; $headers .= "Return-Path: info@pgrevents.co.uk \n"; $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; mail($email, $subject, $message, $headers); echo $message ?>
  8. lol i dont quite know. the file will execute with no errors but no mails going anywhere i know the post vars are working
  9. I am having trouble with php I am new to the whole web design thing and I am having issues with my companys site www.pgrevents.co.uk specificly the php mail for users to activate their account. the script below <? $email = $_POST['email']; $activation = $_POST['activation']; $fname = $_POST['fname']; // email settings $to = ".$email."; $subject = "PGR EVENTS ACTIVATION EMAIL"; $headers = "From: info@pgrevents.co.uk\r\n"; $headers .= "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=\"iso-8859-1\"\r\n" . "Content-Transfer-Encoding: 7bit\r\n"; $message = include('message.php'); mail($to, $subject, $message, $headers); header ('Location:http://www.pgrevents.co.uk/?display=registration&type=complete'); ?> any help would be greatly appreciated. many thanks
×
×
  • 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.