如何将Jquery表单与php结合使用,同时多次循环

如何将Jquery表单与php结合使用,同时多次循环,php,javascript,jquery,html,Php,Javascript,Jquery,Html,我正在尝试运行while循环,我还希望jquery表单对其进行处理,这样页面就不会刷新。到目前为止,代码还可以工作,但它只在第一个循环中使用jquery函数,在其他循环中打开新页面。我需要一些帮助来解决这个问题。先谢谢你。。。 (代码) $query=mysql\u query(“选择*FROM linkUP\u message WHERE to\u mem='$FROM\u mem' 以及发送至“按id描述订购”的“mem_burn='2'和“new_message='3'”; $num\u

我正在尝试运行while循环,我还希望jquery表单对其进行处理,这样页面就不会刷新。到目前为止,代码还可以工作,但它只在第一个循环中使用jquery函数,在其他循环中打开新页面。我需要一些帮助来解决这个问题。先谢谢你。。。 (代码)

$query=mysql\u query(“选择*FROM linkUP\u message WHERE to\u mem='$FROM\u mem'
以及发送至“按id描述订购”的“mem_burn='2'和“new_message='3'”;
$num\u rows=mysql\u num\u rows($query);
如果($num_行<1){
“你没有
此时发出消息。”;
}否则{
while($row=mysql\u fetch\u array($query)){
$msg_id=$row['id'];
$msg_to_mem=$row['to_mem'];
$msg_from_mem=$row['from_mem'];
$msg_from_memID=$row['from_memID'];
$msg_subject=$row['subject'];
$msg_content=$row['content'];
$msg_date=$row['date'];
$msg_from_mem_burn=$row['from_mem_burn'];
$msg_to_mem_burn=$row['to_mem_burn'];
$sqlName=mysql\u查询(“从prociallinkup\u成员中选择*,其中
电子邮件“$from_mem”和电子邮件=“$msg_from_mem”限制1”)或死亡(“对不起,我们
有一个mysql错误!);
while($row=mysql\u fetch\u数组($sqlName)){
$msg_from_memAccount=$row[“accountType”];
$msg_from_memID=$row[“hdw_id”];
$msg_from_memEmail=$row[“email”];
$msg_from_memfirstName=$row[“firstName”];
$msg_from_memlastName=$row[“lastName”];
$msg_from_mem_pic=$row[“profile_pic”];
$SEXT=$row[“SEXT”];}
回声'
阅读日期:
“.$msg_日期”
“.$profile_pic”
“.$msg\u来自\u memfirstName.”“.$msg\u来自\u memlastName.”
给你发这个消息!

您需要使用数组作为输入类型名称,如下所示

<input name="Rdate[]" id="Rdate" type="hidden" value="'.$msg_date.'" /> //do this for all your input fields //and the on php side do print_r($_POST); //对所有输入字段执行此操作 //而php端的 打印(邮政美元);
不知道如何打印($\u POST);在php方面(我正在学习新的编码),请给我举个例子。@Kasagi您将使用
print\r($\u POST)
read_message.php
文件上的
。这就是表单发送数据的地方。
print_r
将向您显示发送到页面的数据。主要用于调试。这对我有什么帮助,我需要jquery脚本的帮助。数据很好地到达页面。 <input name="Rdate[]" id="Rdate" type="hidden" value="'.$msg_date.'" /> //do this for all your input fields //and the on php side do print_r($_POST);