runnerjp Posted June 29, 2006 Share Posted June 29, 2006 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] Quote Link to comment https://forums.phpfreaks.com/topic/13230-i-keep-gettin-an-error-summat-to-do-with-t-string/ Share on other sites More sharing options...
wildteen88 Posted June 29, 2006 Share Posted June 29, 2006 You sure its this script? As I get no errors. Quote Link to comment https://forums.phpfreaks.com/topic/13230-i-keep-gettin-an-error-summat-to-do-with-t-string/#findComment-50932 Share on other sites More sharing options...
Buyocat Posted June 29, 2006 Share Posted June 29, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/13230-i-keep-gettin-an-error-summat-to-do-with-t-string/#findComment-50933 Share on other sites More sharing options...
AndyB Posted June 29, 2006 Share Posted June 29, 2006 <".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. Quote Link to comment https://forums.phpfreaks.com/topic/13230-i-keep-gettin-an-error-summat-to-do-with-t-string/#findComment-50966 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.