The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
|||
|
|||
![]()
Thanks for the help. I have no clue what I'm doing wrong though lol.
Edit : decided to give up on it. Spent 3 days reading through the Reference Manuals for both MySQL and PHP and still get these errors. |
#12
|
|||
|
|||
![]()
Ok, this is really pissing me off. Here's my code.
Code:
<?php // ######################### ERROR REPORTING ############################# error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('NO_REGISTER_GLOBALS', 1); define('GET_EDIT_TEMPLATES', true); define('THIS_SCRIPT', 'topxadmin'); require_once('./global.php'); require_once('./includes/functions_misc.php'); // ###################### Edit Settings ######################## if ($_GET['act'] == "update") { print_cp_header("Top X Control Panel"); $excludedforums=$DB_site->query_first("SELECT excludedforums FROM topx_admin WHERE topx_adminid = '1'"); print_form_header('topxadmin', 'do_update_topxsetting'); print_table_header("Top X Settings"); print_input_row("Forums to exclude", 'exclude_forums',$excludedforums['exclude_forums']); print_submit_row("Update Top X Settings", 0); } if ($_POST['do'] == "do_update_topxsetting") { print_cp_header("Top X Control"); $DB_site->query("UPDATE topx_admin SET excludedforums='{$_POST['exclude_forums']}' WHERE topx_adminid = '1'"); define('CP_REDIRECT', 'topxadmin.php?act=update'); print_stop_message('excluded_forums_updated'); } ?> Edit : feel free to AIM me at thumbsup2mrcoffe to help me, or MSN at thumbsup@gfxhaven.com |
#13
|
||||
|
||||
![]()
First of all, you should specify a default action:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
As already stated above, you must always quote strings from a form or URL, as otherwise this will be a high security risk: PHP Code:
PHP Code:
As a last thing, your script is missing print_cp_footer(); Here is the whole script (topxadmin.php in admincp directory): PHP Code:
[sql] CREATE TABLE `topx_admin` ( `topx_adminid` int(10) unsigned NOT NULL auto_increment, `excludedforums` varchar(255) NOT NULL default '', PRIMARY KEY (`topx_adminid`) ) TYPE=MyISAM AUTO_INCREMENT; [/sql] |
#14
|
|||
|
|||
![]()
I can't get my table to work with the MyISAM AUTO_INCREMENT, and I get this error still lol.
Code:
Database error in vBulletin 3.0.3: Invalid SQL: SELECT excludedforums FROMtopx_admin WHERE topx_adminid = '1' mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE topx_adminid = '1'' at line 1 mysql error number: 1064 |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|