Bandydan Bandydan - 1 year ago 87
HTML Question

My codeigniter form sends textarea using post, and does not send input type text


My Codeigniter has one input type="text" and one textarea. Already on sending I can see (Chrome network sources), that $_POST array does not include input type="text" field, but includes textarea! I even tried to change input to textarea and it worked...

<form action="news_save" method="post" accept-charset="utf-8">

<label class="control-label span3" for="subj">Subject</label>
<input type="text" id="subj" name-"subj" class="row-fluid">

<label class="control-label span3" for="body">Body</label>
<textarea rows="3" name="body" class="row-fluid" id="body"></textarea>

<button type="submit" class="btn btn-primary">Save</button>

Any suggestions, what can it be?

Answer Source

There is problem in input text near name attribute, instead of - it should be =

<input type="text" id="subj" name-"subj" class="row-fluid">

change it to this

<input type="text" id="subj" name="subj" class="row-fluid">
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download