Meine Reglerfunktion:Einreichen Form mit Array von Eingabefeldern
public function c_content()
{
$data['story_id']=$this->input->post('story_id');
$data['template_id']=$this->input->post('template_id');
$data['content']=$this->input->post('content');
$ary_len=count($data); // give me output 1 where as i send 3 value
echo $ary_len;
}
Von hier ich Wert Geschichte id, Template-ID und den Inhalt zu senden, wo als Inhalt ein mehrere Eingangswerte haben.
Meine Ansicht:
<form action="<?=base_url('c_signup/c_content')?>" method="post" >
<input type="text" name='template_id' value=<?php echo $template_id ?> >
<input type="text" id="story_id" name='story_id' value=<?php echo $story_id ?> >
<div class="abc">
<?php
$story_content1=$txt;
// here some code is exected and give me result 3
$result = count($out); // output 3
for ($x = 0; $x < $result; $x++) {
echo("
<input type='text' value='". $out[$x] ."' name='content'>// here i set name of txt field as content
");
?>
<?php
}
?>
</div>
<button value="submit">save</button>
</form>
Also, was ist dein Problem? – bassxzero
Ich werde 3 Werte als Array aus meiner Sicht im Inhaltsfeld senden, aber im Controller wird nur 1 angezeigt. – sani