Welcome Guest, Not a member yet? Register   Sign In
submit multiple inputs within a forloop in codeigniter
#12

(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); 
Reply


Messages In This Thread
RE: submit multiple inputs within a forloop in codeigniter - by Ab ss - 11-03-2017, 06:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB