I am sending a form via POST
method on CodeIgniter 1.7.2 yet when I var_dump($_SERVER)
on the receiving method on the controller the REQUEST_METHOD
is GET
, any clue why? feels like an htaccess issue.
There are several ways to POST
CodeIgniter
echo form_open('email/send');
Html form
<form method="post" accept-charset="utf-8" action="http:/example.com/index.php/email/send" />
Using ajax
$.ajax({
type: "POST",
url: url,
data: data,
success: success,
dataType: dataType
});
You could use CodeIgniter input
$this->input->post('somethig');
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.