» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 81
1 members and 80 guests
brown1
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
Rimonabant
www.rimonabant-weight-loss.com
Football Betting - best nfl betting promotions at sportsbook.com.
Poker Chips - Clay and composite poker chips for home games.

Register Now! Contact Us

About this Page
This is a discussion on passing argumentings in php, need help... within the Site design forums, part of the General category; ok, i'm trying to pass an argument to two different functions, but it only goes to the first function ...



Go Back   Nukemods Forum » General » Site design

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-16-2002, 07:52 PM
Junior Member
 
Join Date: Nov 2002
Posts: 5
passing argumentings in php, need help...
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: "

Code:
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;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:52 AM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31