The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Unexpected $end
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(); ?> Thanks in advance. |
#2
|
|||
|
|||
The code run by the conditional should be surrounded by curley braces. (Not necessary but strongly recommended)
if (condition) { code } Other than that, your code looks like it should work (regardless of how you're using " in unnecessary spots) |
#3
|
|||
|
|||
Still, it doesn't work. I'll try making the HTML with the functions VB provides.
Though, where are the " unnecessary? |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|