ok, i'm trying to pass an argument to two different functions, but it only goes to the first function and not the last one...
here's the simple example i'm having trouble with...
it'll say "eid should be 8" and when i click Preview
it shows eid: 8
then when i click Yes
it should say "eid: 8" again....but it doesn't... it only shows "eid: "
function add_term() {
global $prefix, $module_name, $dbi;
include ('header.php');
OpenTable();
echo "eid should be 8";
echo "<form action=\"modules.php?name=$module_name\" method=\"post\">";
echo "<input type=\"hidden\" name=\"eid\" value=\"8\">";
echo "<input type=\"hidden\" name=\"op\" value=\"preview_term\">";
echo "<input type=\"submit\" value=\"Preview\"><input type=\"button\" onClick=\"history.go(-1)\" value=\"Cancel\"></form>";
CloseTable();
include('footer.php');
}
function preview_term($eid) {
global $module_name;
include ('header.php');
OpenTable();
echo "eid: $eid";
echo "<form method=\"post\" action=\"modules.php?name=$module_name\">";
echo "<input type=\"hidden\" name=\"op\" value=send_term>";
echo "<input type=\"hidden\" name=\"eid\" value=\"$eid\">";
echo "<input type=\"submit\" name=\"op\" value=\"Yes\"><input type=\"button\" onClick=\"history.go(-1)\" value=\"No\">";
echo "</form>";
CloseTable();
include('footer.php');
}
function send_term($eid) {
include ('header.php');
OpenTable();
echo "eid: $eid";
CloseTable();
include ('footer.php');
}
switch($op) {
case "preview_term":
preview_term($eid);
break;
case "send_term":
send_term($eid);
break;
default:
add_term();
break;
}