vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Makeformheader() woes... (https://vborg.vbsupport.ru/showthread.php?t=56273)

gengar003 08-17-2003 02:56 PM

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?

Dean C 08-17-2003 03:45 PM

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"); 



gengar003 08-17-2003 03:58 PM

ook, thank u, I'll try that.

gengar003 08-17-2003 04:14 PM

eeh, nope, didn't work.

same error, but this time on line 7... (same code as line 8 in original post)

Dean C 08-17-2003 04:20 PM

You're including global.php right?

gengar003 08-17-2003 04:30 PM

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?

Dean C 08-17-2003 06:20 PM

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



gengar003 08-17-2003 09:14 PM

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?

gengar003 08-17-2003 09:20 PM

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!

Dean C 08-18-2003 10:36 AM

Your welcome :)

- miSt


All times are GMT. The time now is 07:38 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.01076 seconds
  • Memory Usage 1,759KB
  • 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
  • (6)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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