View Full Version : Makeformheader() woes...
gengar003
08-17-2003, 02:56 PM
Hmm.,.. this isn't a cry for help, more of a request... anyway, i'm using this:
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
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
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.
$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:
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
} 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
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.