GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   PHP code error help needed... (https://gfy.com/showthread.php?t=556294)

acctman 12-24-2005 08:00 PM

PHP code error help needed...
 
i'm receiving this error Parse error: parse error, unexpected '}' on line 5
Code:

        if ($en['act'] hahahaha 'prefs') {
                        $err = 'fix';
if ($en['m_rateme'] hahahaha 3) {
                sql_query("UPDATE $membtable SET m_comme=".(int)($en['com_me'] hahahaha 'ON').
} else {
                                                                sql_query("UPDATE $membtable SET m_rateme=".(int)($en['rateme'] hahahaha 'ON').
                ", m_msg_alerts=".(int)($en['alert_me'] hahahaha 'ON').
                                                                ", m_blockmsgs=".(int)($en['blockmsgs'] hahahaha 'ON').
                " WHERE m_id=$en[m_id]");
                $en['message'] = _prefs_saved;
                $req = $en['req'] = 'members';
              }
}

thanks in advance

Linguist 12-24-2005 08:23 PM

if ($en['m_rateme'] hahahaha 3) {
sql_query("UPDATE $membtable SET m_comme=".(int)($en['com_me'] hahahaha 'ON').
} else {

The dot is most likely the problem, try putting semicolon there instead

edit: actually, you may want to end the sql statement before you put the semicolumn :)

woj 12-24-2005 09:16 PM

hit me up on icq, I'll give you a hand, 33375924

acctman 12-24-2005 10:31 PM

I think i fixed it by just repeating the full statement. its not the best way to do it cause i'm using extra coding that is not needed but it works i guess.

include 'includes/verify_session.php';
//save main preferences
if ($en['act'] hahahaha 'prefs')
if ($en['m_rateme'] hahahaha 3) {
sql_query("UPDATE $membtable SET m_comme=".(int)($en['com_me'] hahahaha 'ON').
", m_msg_alerts=".(int)($en['alert_me'] hahahaha 'ON'). ", m_blockmsgs=".(int)($en['blockmsgs'] hahahaha 'ON').
" WHERE m_id=$en[m_id]");
$en['message'] = _prefs_saved;
$req = $en['req'] = 'members';

} else {
sql_query("UPDATE $membtable SET m_rateme=".(int)($en['rateme'] hahahaha 'ON').
", m_comme=".(int)($en['com_me'] hahahaha 'ON').
", m_msg_alerts=".(int)($en['alert_me'] hahahaha 'ON').
", m_blockmsgs=".(int)($en['blockmsgs'] hahahaha 'ON').
" WHERE m_id=$en[m_id]");
$en['message'] = _prefs_saved;
$req = $en['req'] = 'members';
}


All times are GMT -7. The time now is 02:13 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123