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
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()
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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