Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #1  
Old 08-17-2003, 02:56 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Makeformheader() woes...

Hmm.,.. this isn't a cry for help, more of a request... anyway, i'm using this:

PHP Code:
function modifyform() {
maketableheader("Modifying TAC?mon:"); 
 
makeformheader("tacemon","add"); //Line 8
makelabelcode("Old Name:","old_name",$old_name); 
makelabelcode("New Name:","new_name",$new_name); 
makelabelcode("New Variable:","new_var",$new_var); 
makelabelcode("New Data:","new_data",$new_data); 
makeformfooter("Submit Modifications");

the first line, maketableheader(), works, but then it gives a :

"Fatal error: Call to undefined function: makeformheader() in /home/pgsforum/public_html/vb/admin/tacemon.php on line 8
"

any idea why?
Reply With Quote
  #2  
Old 08-17-2003, 03:45 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
function modifyform() { 
makeformheader("tacemon","add"); //Line 8 
maketableheader("Modifying TAC?mon:"); 
makelabelcode("Old Name:","old_name",$old_name); 
makelabelcode("New Name:","new_name",$new_name); 
makelabelcode("New Variable:","new_var",$new_var); 
makelabelcode("New Data:","new_data",$new_data); 
makeformfooter("Submit Modifications"); 

Reply With Quote
  #3  
Old 08-17-2003, 03:58 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ook, thank u, I'll try that.
Reply With Quote
  #4  
Old 08-17-2003, 04:14 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

eeh, nope, didn't work.

same error, but this time on line 7... (same code as line 8 in original post)
Reply With Quote
  #5  
Old 08-17-2003, 04:20 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're including global.php right?
Reply With Quote
  #6  
Old 08-17-2003, 04:30 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bleh, i found the problem - i'm using the wrong ***code(); stuff. this is what I have that works now

PHP Code:

function modifyform() { 
doformheader("tacemon","modifying");
maketableheader("Modifying TAC?mon:"); 
makeinputcode("Old Name:","old_name",$old_name);
makeinputcode("New Name:","new_name",$new_name);
makeinputcode("New Variable:","new_var",$new_var);
makeinputcode("New Data:","new_data",$new_data);
doformfooter("Submit Modifications");

however, am i correct in assuming that it sends using POST? if so, is there a way to grab POST vars like get?
e.g.
PHP Code:
$mooomoo $HTTP_POST_VARS[bvlah]; 
if not, is there a way to make it send in GET?

EDIT: perhaps it's not sending at all... how to fix?
Reply With Quote
  #7  
Old 08-17-2003, 06:20 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's no need to really do what you did with that function just do it like this:

PHP Code:
if($action == 'addyourstuff')
{
doformheader("tacemon","modifying"); 
maketableheader("Modifying TAC?mon:"); 
makeinputcode("Old Name:","old_name",$old_name); 
makeinputcode("New Name:","new_name",$new_name); 
makeinputcode("New Variable:","new_var",$new_var); 
makeinputcode("New Data:","new_data",$new_data); 
doformfooter("Submit Modifications"); 
}

if(
$HTTP_POST_VARS['modifying'])
{
// insert your queries and error checking here n stuff

Reply With Quote
  #8  
Old 08-17-2003, 09:14 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it's actually in a bracket like that... so it does send in post then, ne?

So... I'd want to change

PHP Code:
} else if($action=="modifying"){
////////////////////////////////////////////////////MODIFYING TACEMON///////////
   
$th_rite_name $HTTP_GET_VARS['new_name'];
   
$th_old_name $HTTP_GET_VARS['old_name'];
   
$th_rong_name $HTTP_GET_VARS['new_var'];
   
$new_data $HTTP_GET_VARS['new_data'];
   
$keeparray $DB_site->query_first("SELECT name,catchname,data FROM tacemonquery WHERE name='$th_old_name'");
    if (
$th_rite_name == "keep"){
    
$th_rite_name $keeparray[name];
    }
    if (
$th_rong_name == "keep"){
    
$th_rong_name $keeparray[catchname];
    }
    if (
$new_data == "keep"){
    
$new_data $keeparray[data];
    }

   
$DB_site->query("UPDATE `tacemonquery` SET `catchname`='$th_rong_name' WHERE `name`='$th_old_name'");
   
$DB_site->query("UPDATE `tacemonquery` SET `data`='$new_data' WHERE `name`='$th_old_name'");
   
$DB_site->query("UPDATE `tacemonquery` SET `name`='$th_rite_name' WHERE `name`='$th_old_name'");
   
$DB_site->query("ALTER TABLE user CHANGE $keeparray[catchname] $th_rong_name TINYINT(1) NOT NULL");




echo 
"Success!!!";
modifyform();

instead of _GET_VARS to _POST_VARS?

and it shoud work?
Reply With Quote
  #9  
Old 08-17-2003, 09:20 PM
gengar003's Avatar
gengar003 gengar003 is offline
 
Join Date: Apr 2002
Location: .::|The Matrix|::.
Posts: 181
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UPDATE: Yay! fixed it! It turns out that the action to start the querys was using _GET_VARS not _POST, so i just changed that. THANK U, mist!
Reply With Quote
  #10  
Old 08-18-2003, 10:36 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Your welcome

- miSt
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 12:49 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04280 seconds
  • Memory Usage 2,281KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete