Bandydan Bandydan - 2 months ago 9
HTML Question

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

All.

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>
</form>


Any suggestions, what can it be?

Answer

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">
Comments