• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
submit multiple inputs within a forloop in codeigniter

Hey, Abdelrahman, that's great! It's so satisfying to finally solve a problem, isn't it? Smile

Thanks for coming back and reporting what happened. As for any help I provided, you are very welcome! This is what these forums are for. Smile
Hey, don't work without a PHP debugger. Several free IDEs have this features built in. Two are NetBeans and CodeLobster. Without a debugger, it's like you're driving with a blindfold on -- you are going to crash!

(03-27-2015, 09:30 AM)RobertSF Wrote: Thank You RobertSF,
can i know where to insert
 // array_search returns the key associated with the value you search
$question_id = array_search('Save', $_POST);

// take away the starting S
$question_id = substr($question_id, 1);

as i did it in controllers i got error.

syntax error, unexpected '$question_id' (T_VARIABLE), expecting function (T_FUNCTION) or const (T_CONST)

PHP Code:
<input type="submit" name="<?php echo 'S' . $row->id; ?>" value="Save" /> 

PHP Code:
// array_search returns the key associated with the value you search
$question_id array_search('Save'$_POST);

// take away the starting S
$question_id substr($question_id1); 

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.