Php 使用jquery从生成的文本框中检索值

Php 使用jquery从生成的文本框中检索值,php,jquery,Php,Jquery,我使用jquery生成了一个文本框和文件上传按钮,如下所示 $(this).before("<div class='col-lg-12'><div class='row'><div class='col-lg-4'><input name='refusal_str[]' type='text' placeholder='Enter File description'></div><div class='col-lg-4'>

我使用jquery生成了一个文本框和文件上传按钮,如下所示

$(this).before("<div class='col-lg-12'><div class='row'><div class='col-lg-4'><input name='refusal_str[]' type='text'  placeholder='Enter File description'></div><div class='col-lg-4'><input name='refusal[]' type='file'></div></div></div>");
当我这样做时,我得到以下错误:

Uninitialized string offset: 0

您正试图使用PHP访问testi_文本条目,但您的HTML显示它被称为“拒绝”\u str[],因此您需要访问该条目:

// retrieving the text box value
$testi_text = $_REQUEST['refusal_str'][$key];
p.S.var_dump$请求;应该向您显示从表单中获得的值

// retrieving the text box value
$testi_text = $_REQUEST['refusal_str'][$key];