Jump to content

Help with Parse Error (ahhhh)


avo

Recommended Posts

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

[code]            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");[/code]

It says Line 79 thats this line:-

[code]        $err = db_error_log()
        if($err == '')    
        {    [/code]

[code]if($err == '')    [/code]

Thanks again .

Link to comment
https://forums.phpfreaks.com/topic/6465-help-with-parse-error-ahhhh/
Share on other sites

replace
[code]        $err = db_error_log()
        if($err == '')    
        {    [/code]
with
[code]        $err = db_error_log();
        if($err == '')    
        {    [/code]
; added after $err = db_error_log()

Archived

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

×
×
  • 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.