I have a problem with post request. On my localhost every codes run well also POST request. As for on a real host POST requests not working. Dont understand why?
Here is my html codes
<form action="<?php echo base_url()."/ayarlar/guncelle" ?>" method="post" enctype="multipart/form-data" >
<div class="form-group">
<label>Web Sitesi İsmi</label>
<input type="text" class="form-control" placeholder="Web Sitesi İsmi" name="siteismi" value=""/>
</div>
<div class="form-group mb-0">
<div>
<button type="submit" class="btn btn-primary waves-effect waves-light mr-1">
Güncelle
</button>
</div>
</div>
</form>
by the way at config.php public $baseURL = 'http://www.catidekorasyon.com/panel';
Controllers/ayarlar.php
<?php namespace App\Controllers;
class Ayarlar extends BaseController
{
public $viewFolder="";
public function __construct()
{
parent::__construct();
$this->viewFolder = "ayarlar_v";
$this->ayarlarModel = model('App\Models\AyarlarModel', false);
$this->session=session();
}
public function guncelle()
{
$viewData = new \stdClass();
$viewData->viewFolder = $this->viewFolder;
helper(['form', 'url','tools','Text']);
$validation = \Config\Services::validation();
$siteismi=$this->request->getPost("siteismi");
print_r($siteismi);
die();
}
and result is
Array
(
)
What are your opinions