<?php
include '../config.php';

if(isset($_POST['menu_name']) && isset($_POST['option_value'])){
    if(getSingleValue('tt_info', 'InfoName', $_POST['menu_name'], 'InfoID') !=''){
          $data_for_update = array(
            "InfoValue"=>$_POST['option_value'],
          );
          UpdateData('tt_info', 'InfoName', $_POST['menu_name'], $data_for_update);
    }else{
     $post_form_data = array(
        "InfoName"=>$_POST['menu_name'],
        "InfoValue"=>$_POST['option_value'],
     );
     InsertData('tt_info', $post_form_data);
    }
}
?>
