0

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?

2 Answers 2

2

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">
Sign up to request clarification or add additional context in comments.

Comments

0
$array= array(namedb' => $this->input->post('body'));

and after insert to db.

$this->ModelFile->MetodModel($array);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.