Parse Error

ForgeForge Senior MemberThe Royal RAM
Parse error: parse error, unexpected T_STRING in /home/outpost/public_html/members.php on line 192

This is the error i got ^^ and this is line 191 - 201:

$message = "
Welcome to Outpost Gamers.com $user, Your account has succesfully created and you may now use your account by doing the following:
You need you activate your account by entering this activation code $key at this page:
http://gambit.liquidweb.com/~outpost/members.php?mode=register&do=activate
Once finished, you may use your account.
user: $user
pass: $pass1

Thank you for registering at outpostgamers.com
NOTE: THIS IS A AUTOMATED EMAIL, DO NOT REPLY!
";

Anyone know whats wrong with it?
Can fat people Go skinny Dipping?

Comments

  • PythonPython Forum Leader The Royal RAM
    im not 100% sure since im still learning PHP but i think that where youve got the variable $key within the variable $message, i think it might need to be printed out instead of just stated like youve done. Because if I remember right variables cant be used within " and ". Instead they are only used within ' and '

    I might be wrong though. try taking the $key variable out and see what happens.

    The Royal Ram

  • dabossdaboss WP V.I.P. ''The Boss'' Administrator
    Hmmm.... Your code tested out OK on my server. I created an empty file and put the following into the file and executed it. Did you miss anything out in your post?

    <?php
    $user = "UserName";
    $key = "123";
    $pass1 = "Password";
    $message = "
    Welcome to Outpost Gamers.com $user, Your account has succesfully created and you may now use your account by doing the following:
    You need you activate your account by entering this activation code $key at this page: http://www.yourwebsite.com
    Once finished, you may use your account.
    user: $user
    pass: $pass1

    Thank you for registering at outpostgamers.com
    NOTE: THIS IS A AUTOMATED EMAIL, DO NOT REPLY!
    ";
    echo $message;
    ?>
  • ArestiaArestia Member NAT Warrior
    try this

    <?php
    $message = "Welcome to Outpost Gamers.com $user, Your account has succesfully created and you may now use your account by doing the following:\nYou need you activate your account by entering this activation code $key at this page:\nhttp://gambit.liquidweb.com/~outpos...ter&do=activate\nOnce finished, you may use your account.\nuser: $user\npass: $pass1\n\nThank you for registering at outpostgamers.com\nNOTE: THIS IS A AUTOMATED EMAIL, DO NOT REPLY!";
    ?>

    -Dan
    Arestia Design Studios / Synapse Corporate Solutions
    Daniel L. Rust - Lead Architect
    Seattle, WA
  • ForgeForge Senior Member The Royal RAM
    Ok, Ill post the entire code for you guys to look at... Here it is..

    [php]

    $query = "SELECT * FROM members WHERE user_name='$user'";
    $result = mysql_query($query);

    if(mysql_num_rows($result) > 0){
    $errors = "Username Has Already Been Taken";
    }
    else {
    $key1 = rand(100, 999);
    $key2 = rand(100, 999);
    $key3 = rand(100, 999);
    $key = " '. $key1 .'-'. $key2 .'-'. $key3 .' ";
    $query = "INSERT INTO member(user_name, user_pass, user_email, user_key)". "VALUES('$user','$pass1','$email','$key');
    $result = mysql_query($query);
    if($result){

    $to = $email;
    $message = "Welcome to Outpost Gamers.com $user, Your account has succesfully created and you may now use your account by doing the following:\nYou need you activate your account by entering this activation code $key at this page:\nhttp://gambit.liquidweb.com/~outpost/members.php?mode=register&do=activate\nOnce finished, you may use your account.\nuser: $user\npass: $pass1\n\nThank you for registering at outpostgamers.com\nNOTE: THIS IS A AUTOMATED EMAIL, DO NOT REPLY!";
    $subject = "Outpostgamers Account Information";

    $headers = "To: $mail";
    $headers .= "From: register@outpostgamers.com";

    mail($to, $subject, $message, $headers);
    }
    else {
    echo "An Error has caused and your account cannot be created. We are sorry for the inconvience. Please try again.";
    }
    [/php]

    I hope i can figure this out, maybe if i just make multiple pages....
    Can fat people Go skinny Dipping?
  • ForgeForge Senior Member The Royal RAM
    Its ok guys, Im just making multiple pages. easier actually...
    Can fat people Go skinny Dipping?
Sign In or Register to comment.