Ok, today I was experimenting on adding stuff to the admin CP, and I made a simple script to see the results and if it'd work. Well, it didn't. I keep getting "Parse error: syntax error, unexpected $end in C:\wamp\www\vbe\admincp\ban_user.php on line 19". Here is the script (named "ban_user.php"):
Code:
<?php
// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
@set_time_limit(0);
// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array('style');
$specialtemplates = array('products');
// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
require_once(DIR . '/includes/adminfunctions_template.php');
print_cp_header();
echo "<form action='ban_user.php' method='post'><input type='hidden' value='ban' name='do' />Ban user:<br /><input type='text' name='toban' length='155' /><br /><input type='submit' value='Submit' /></form>";
if ($_POST["do"]=="ban")
mysql_array("UPDATE " . TABLE_PREFIX . "user SET usergroupid='8' WHERE username='" . $_POST["toban"] . "');
print_cp_footer();
?>
What is wrong with the "?>" there?
Thanks in advance.