10-06-2016, 12:45 AM
This is not working, as I have to?
<?php
if(isset($_POST['submit'])) {
$db = DB::getInstance();
$fields=array(
'var1' => $var1,
'var2' => $var2
);
if($db->insert('table',$fields)){
$yes[] = 'text';
}else{
$no[] = 'text';
}
$last_id = $db->lastId();
}
?>
<?php
if(isset($_POST['submit'])) {
$db = DB::getInstance();
$fields=array(
'var1' => $var1,
'var2' => $var2
);
if($db->insert('table',$fields)){
$yes[] = 'text';
}else{
$no[] = 'text';
}
$last_id = $db->lastId();
}
?>