vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   UPDATED - costum editCP - print_input_row appears empty with images. (https://vborg.vbsupport.ru/showthread.php?t=204084)

Vaupell 02-03-2009 03:28 PM

UPDATED - costum editCP - print_input_row appears empty with images.
 
1 Attachment(s)
Trying to get a Edit box to function..
Attachment 94000

It shows up fine, but it always show up empty..
Attachment 94001

Code:


print_cp_header("Edit code");

$code=$db->query("SELECT * FROM " . TABLE_PREFIX . "vbinvitationcode WHERE codedbID='".$_GET['id']."'");

                <input type='hidden' name='codedbID' value='".$code['codedbID']."'>";
        print_form_header('Edit', 'goeditsave');
    print_table_header("Edit invitation code");
        print_input_row("Invitation Code", 'InvitationCODE', $code['InvitationCODE']);
        print_input_row("Put user in Group ID", 'NewusergroupID', $code['NewusergroupID']);
        print_submit_row("Save changes", 0);
        print_cp_footer();
}

Id is transfered from previous selection, where the user selects EDIT
all works and i get the form, but its empty, fields are empty..

any ideas why nothing shows ?

EDIT : added images, for ilustation

Dismounted 02-04-2009 05:11 AM

Always clean your variables... Your query will return a result object, not an array as you expect it, use this:
PHP Code:

$code $vbulletin->db->query_first("
    SELECT *
    FROM " 
TABLE_PREFIX "vbinvitationcode
    WHERE codedbID = " 
intval($_GET['id']) . "
    LIMIT 1
"
); 



All times are GMT. The time now is 04:54 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01055 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete