Jump to content


Photo

Help with Parse Error (ahhhh)


  • Please log in to reply
1 reply to this topic

#1 avo

avo
  • Members
  • PipPipPip
  • Advanced Member
  • 148 posts
  • Locationstaffordshire uk

Posted 03 April 2006 - 10:40 AM

Hi All


Ive been pulling my hair out with this one i can't see for the life of me why im getting this error can you please help me our .

thanks in advance

error im getting is:-

Parse error: parse error, unexpected T_IF in htdocs/admin/newuser.php on line 79

            require    ("../inc/config.php");
            $username = sanitize_variable($_REQUEST['username']);    
            $password = sanitize_variable($_REQUEST['password']);    

            if($user_password_function == 1)
            {
                $query = "INSERT INTO USERS(userName,userPassword,userStatus)
                    values('$username',password('$password'),1)";
            }
            else
            {

                $query = "INSERT INTO USERS(userName,userPassword,userStatus)
                    values('$username',md5('$password'),1)";
            }

            db_query($query,$con);

        $err = db_error_log()
        if($err == '')    
        {    

                $userid = db_insert_id('users_userid_seq');
                $email = sanitize_variable($_REQUEST['email']);

                $query = "INSERT INTO userProfile(userEmail, userId)
                        VALUES('$email', $userid)";

                db_query($query);
                $err = db_error_log();

                if($err == '')    
                {
                    err_message('Account created.');
                    require("signup.txt");

It says Line 79 thats this line:-

        $err = db_error_log()
        if($err == '')    
        {    

if($err == '')    

Thanks again .


Im loving it ........

#2 Honoré

Honoré
  • Members
  • PipPipPip
  • Advanced Member
  • 66 posts
  • LocationAntwerp - Belgium

Posted 03 April 2006 - 11:08 AM

replace
        $err = db_error_log()
        if($err == '')    
        {    
with
        $err = db_error_log();
        if($err == '')    
        {    
; added after $err = db_error_log()




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users