facets
09-18-2005, 09:55 AM
Hi There,
Perhaps my other question was too 'much' to start with.
So i'll break it down and ask the main question.
How do I submit to a DB with out using the 'submit' function in a form.
I think I need to do this as my code is being included from a functions page.
So i'm guessing the variable isn't being passed.
Also, the other issue is that once I do hit submit it reloads the index page rather the edit.php page. Obviously index.php is my default in the switch case.
Any suggestions?
// Set varibale for switch action
$action = isset($_GET['action']) ? $_GET['action'] : '';
switch($action) {
case "editStockSpec":
fnViewFaceStockSpec();
break;
case "editAdhesiveSpec":
fnViewAdhesiveSpec();
break;
case "editLinerSpec":
fnViewLinerSpec();
break;
case "editSASummary":
editSASummary(); break;
case "viewStockSpec":
fnViewFaceStockSpec();
break;
case "viewAdhesiveSpec":
fnViewAdhesiveSpec();
break;
case "viewLinerSpec":
fnViewLinerSpec();
break;
case "viewAddFaceStock":
fnAddFaceStock();
break;
case "addAdhesive":
fnAddAdhesive();
break;
case "addLiner":
fnAddLiner();
break;
case "addFs":
fnCreateFs();
break;
case "addFaceStock":
viewAddFaceStock();
break;
case "addSAStockSummary" :
addSAStockSummary();
break;
default:
showMenu();
break;
}
Perhaps my other question was too 'much' to start with.
So i'll break it down and ask the main question.
How do I submit to a DB with out using the 'submit' function in a form.
I think I need to do this as my code is being included from a functions page.
So i'm guessing the variable isn't being passed.
Also, the other issue is that once I do hit submit it reloads the index page rather the edit.php page. Obviously index.php is my default in the switch case.
Any suggestions?
// Set varibale for switch action
$action = isset($_GET['action']) ? $_GET['action'] : '';
switch($action) {
case "editStockSpec":
fnViewFaceStockSpec();
break;
case "editAdhesiveSpec":
fnViewAdhesiveSpec();
break;
case "editLinerSpec":
fnViewLinerSpec();
break;
case "editSASummary":
editSASummary(); break;
case "viewStockSpec":
fnViewFaceStockSpec();
break;
case "viewAdhesiveSpec":
fnViewAdhesiveSpec();
break;
case "viewLinerSpec":
fnViewLinerSpec();
break;
case "viewAddFaceStock":
fnAddFaceStock();
break;
case "addAdhesive":
fnAddAdhesive();
break;
case "addLiner":
fnAddLiner();
break;
case "addFs":
fnCreateFs();
break;
case "addFaceStock":
viewAddFaceStock();
break;
case "addSAStockSummary" :
addSAStockSummary();
break;
default:
showMenu();
break;
}