Jump to content

Archived

This topic is now archived and is closed to further replies.

runnerjp

I Keep Gettin An Error :( Summat To Do With T-string

Recommended Posts

hey all im setting up a login script and when i got to the [a href=\"http://werun2win.com/main.php\" target=\"_blank\"]main page [/a]
i get the error
[b]Parse error: syntax error, unexpected T_STRING in /home/werun2wi/public_html/include/mailer.php on line 25[/b]



here is script.... wats wrong with it ????

[code]<?
/**
* Mailer.php
*
* The Mailer class is meant to simplify the task of sending
* emails to users. Note: this email system will not work
* if your server is not setup to send mail.
*
* If you are running Windows and want a mail server, check
* out this website to see a list of freeware programs:
* <http://www.snapfiles.com/freeware/server/fwmailserver.html>
*
* Written by: Jpmaster77 a.k.a. The Grandmaster of C++ (GMC)
* Last Updated: August 19, 2004
*/

class Mailer
{
   /**
    * sendWelcome - Sends a welcome message to the newly
    * registered user, also supplying the username and
    * password.
    */
   function sendWelcome($user, $email, $pass){
      $from = "From: ".WERUN2WIN ADMIN." <".WERUN2WIN@WERUN2WIN.COM.">";
      $subject = "WELCOME 2 WERUN2WIN";
      $body = $user.",\n\n"
             ."Welcome! You've just registered at WERUN2WIN "
             ."with the following information:\n\n"
             ."Username: ".$user."\n"
             ."Password: ".$pass."\n\n"
             ."If you ever lose or forget your password, a new "
             ."password will be generated for you and sent to this "
             ."email address, if you would like to change your "
             ."email address you can do so by going to the "
             ."My Account page after signing in.\n\n"
             ."- WERUN2WIN";

      return mail($email,$subject,$body,$from);
   }
  
   /**
    * sendNewPass - Sends the newly generated password
    * to the user's email address that was specified at
    * sign-up.
    */
   function sendNewPass($user, $email, $pass){
      $from = "From: ".WERUN2WIN." <".WERUN2WIN@WERUN2WIN.COM.">";
      $subject = "werun2win - Your new password";
      $body = $user.",\n\n"
             ."We've generated a new password for you at your "
             ."request, you can use this new password with your "
             ."username to log in to WERUN2WIN.\n\n"
             ."Username: ".$user."\n"
             ."New Password: ".$pass."\n\n"
             ."It is recommended that you change your password "
             ."to something that is easier to remember, which "
             ."can be done by going to the My Account page "
             ."after signing in.\n\n"
             ."- WERUN2WIN";
            
      return mail($email,$subject,$body,$from);
   }
};

/* Initialize mailer object */
$mailer = new Mailer;

?>[/code]

Share this post


Link to post
Share on other sites
WERUN2WIN ADMIN that is most likely the problem, your error means that it found a text string where it shouldn't have. Right there, I'm not sure if you are trying to use a constant, but it has a space in it so it screws up the thing. If it isn't a constant then just put it in quotes.

Share this post


Link to post
Share on other sites
<".WERUN2WIN@WERUN2WIN[b][!--sizeo:5--][span style=\"font-size:18pt;line-height:100%\"][!--/sizeo--].[!--sizec--][/span][!--/sizec--][/b]COM.">";

That's your problem. The . between the domain name and com is interpreted as a concatenation operator.

Share this post


Link to post
Share on other sites

×

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.