I try to submit some data from view to model via controller, but it won't do anything.
In the view i have a form which submit some data to controller
The Controller:
if(isset($POST['CNE']))
{
$Craftname=$_POST['Str'].$_POST['Dex'].$_POST['Rec'].$_POST['Int'].$_POST['Wis'].$_POST['Luc'];
$Craftname.=$_POST['HP'].$_POST['MP'].$_POST['SP'].$_POST['Enchant'];
$update = array(
'ItemID' => $_POST['ItemID'],
'Type' => $_POST['Type'],
'TypeID' => $_POST['TypeID'],
'Gem1' => $_POST['Gem1'],
'Gem2' => $_POST['Gem2'],
'Gem3' => $_POST['Gem3'],
'Gem4' => $_POST['Gem4'],
'Gem5' => $_POST['Gem5'],
'Gem6' => $_POST['Gem6'],
'Craftname' => $Craftname,
'Count' => $_POST['Count']
);
$this->item_edit->updateItem($update, $_POST['ItemUID']);
}
And the Model
function updateItem($update, $uid)
{
$this->db->where('ItemUID', $uid);
$this->db->update('PS_GameData.dbo.CharItems' ,$update);
}
On submit the view displays the posted data as follows
Name Value
ItemName Dreamy Vallum Helmet
ItemUID 4513324807718567936
ItemID 16052
Type 16
TypeID 52
Gem1 7
Gem2 0
Gem3 0
Gem4 0
Gem5 0
Gem6 0
Str 06
Dex 00
Rec 00
Int 00
Wis 05
Luc 04
HP 00
MP 00
SP 00
Enchant 00
Count 1
But the data won't be submitted to the database aswell.. on refresh the data displays as was before. It won't prompt me with any errors at all. Maybe someone can help me figure out the issue.