Parse error: parse error, unexpected T_CASE

Hello all,
any help will be appreciated.

I get this error when installing jam affiliate script:

Parse error: parse error, unexpected T_CASE in /home/content/mydomain/aff2/includes/mod/mod_main.php on line 72

The code related to this line is lines 70-127 :

if ( empty( $_POST['change_status'] ) ) { case "commissions" : switch ( $mod ) { switch ( $_POST['change_status'] ) { case "delete" : if ( $access == "deletecomm" ) { display_admin_form( "admin_error_form" ); exit( ); } case "approve" : case "disapprove" : case "paid" : case "unpaid" : case "pending" : if ( !( $access == "payaffs" ) && !( $access == "editcomm" ) && !( $access == "approvecomm" ) ) { display_admin_form( "admin_error_form" ); exit( ); } } continue; switch ( $mod ) { case "affiliates" : switch ( $_POST['change_status'] ) { case "active" : case "inactive" : case "remove" : if ( $access == "editaff" ) { display_admin_form( "admin_error_form" ); exit( ); } case "delete" : if ( $access == "deleteaff" ) { display_admin_form( "admin_error_form" ); exit( ); } } if ( !ereg( "group", $_POST['change_status'] ) || !( $access == "editaff" ) ) { display_admin_form( "admin_error_form" ); exit( ); } } } } else { $seclevel = ""; } }

And as an over kil here are lines 10-127

[SNIP]

Thank you in advance

MOD EDIT: Dropped irrelevant code

In line 72, why are you using a CASE statement? :slight_smile:

Umm, because that is the way the script came as I thought was obvious, I didn’t write jam affiliates, I am just trying to install it and get this error and want to fix it, any help would be great :O)

If this is a third-party script you would get better technical support by contacting the author(s) of the script. All I can say about this code is that the CASE statement in line 72 is what’s screwing up your script. It’s not supposed to be there.

Sponsor our Newsletter | Privacy Policy | Terms of Service