<?php 
$communityid = isset($_POST['postvalue']) ? $_POST['postvalue'] : 0;
include_once $_SERVER['DOCUMENT_ROOT'] . "/eventconfig.php";
include_once CLASSFOLDER . "/dbconnection.php";
include_once CLASSFOLDER . "/communities.php";
$community = new communityclass($dbconnection->dbconnector);
include_once CLASSFOLDER . "/catalogs.php";
$catalog = new catalogclass($dbconnection->dbconnector);
include_once CLASSFOLDER . "/events.php";
$event = new eventclass($dbconnection->dbconnector);
$communitydata = !empty($communityid) ? $community->getcommunitybyid($communityid) : array();
$selectedState = !empty($communityid) ? $community->getSelectedState($communityid) : array();
$selectedZone = !empty($communityid) ? $community->getSelectedZone($communityid) : array();
$selectedEvents = !empty($communityid) ? $event->getSelectedEventByCommunityId($communityid) : array();
?>
 
  <form  id="update-communitydetails" name="update-communitydetails" action="" method="post" novalidate="novalidate">
    <input type="hidden" id="communityid" name="communityid" value="<?php 
echo !empty($communityid) ? $communityid : 0;
?>
" />
    <div class="box box-primary">
      <div class="box-body"> 
        <div class="row">
         <div class="form-group margin">
          <label><span class="text-error">*</span> Community Name</label>
          <input type="text"  id="eventname" name="name" value="<?php 
echo !empty($communitydata['name']) ? $communitydata['name'] : '';
?>
" maxlength="25" placeholder="Login Name" class="form-control" >
        </div>