Add a new bargain API

<?php
include("src/Ratebe.php");
include("config.php");
$action = 'bargain_add';
$msg = 'Please enter info for all * fields.';
$go = false;
if(@$_POST["st"]=="go"){
  $title = $_POST['title'];
  $url = $_POST['url'];
  $photo_url = $_POST['photo_url'];
  $start_date = $_POST['start_date'];
  $end_date = $_POST['end_date'];
  $des = $_POST['des'];
  $catID = $_POST['catID'];
  $tags = $_POST['tags'];
  if($title=="" || $url=="" || $photo_url=="" || $start_date=="" || $end_date=="" || $des=="" || $catID==""){
    $msg = 'You need to enter all required info for * field';
  }
  else{
    $rest_data = array(
   'bizID' => $auth_arr['bizID'],
   'title' => $title,
   'url'=> $url,
   'photo_url'=> $photo_url,
   'start_date'=> $start_date,
   'end_date'=> $end_date,
   'des'=> $des,
   'catID'=> $catID,
   'tags'=> $tags
    ); 
    
    $Ratebe = new Ratebe($auth_arr,$action,$rest_data);
    $result_arr = $Ratebe->go();
    $go = true;
    
    if($result_arr["result"]=="success")
      $msg = 'You have posted a new bargain successfully at: <a target="_blank" href="'.$Ratebe::SITE_BARGAIN.'">Ratebe bargain</a>';
    else if($result_arr["result"]=="fail")
      $msg = 'You have failed to post a new bargain. Reason: '.$result_arr["error"];
  }
}
$Ratebe = new Ratebe("","","");
?>