0

我对 jquery 很陌生,所以任何帮助都将不胜感激。我正在使用 jquery 1.8.3 和 ui 1.9.2。我在页面中包含了 jquery ui 选项卡,并且在其中一个选项卡中,我有多行字段,用户可以填写并提交到数据库。

PHP 代码(new_member.php):

<form action = "" method = "POST">
<table id = "member">
    <thead>
        <tr>
            <th>Gender</th>
            <th>Birthday</th>
            <th>Name</th>
            <th>Surename</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td><select name = "gender"><option value = "male">Male</option><option value = "female">Female</option></select></td>
            <td><input class = "date" name = "bdate" type = "text"></td>
            <td><input class = "field_text" type = "text" name = "name"></td>
            <td><input class = "field_text" type = "text" name = "surename"></td>
        </tr>
        <tr>
            <td><select name = "gender"><option value = "male">Male</option><option value = "female">Female</option></select></td>
            <td><input class = "date" name = "bdate" type = "text"></td>
            <td><input class = "field_text" type = "text" name = "name"></td>
            <td><input class = "field_text" type = "text" name = "surename"></td>
        </tr>
        <tr>
            <td><select name = "gender"><option value = "male">Male</option><option value = "female">Female</option></select></td>
            <td><input class = "date" name = "bdate" type = "text"></td>
            <td><input class = "field_text" type = "text" name = "name"></td>
            <td><input class = "field_text" type = "text" name = "surename"></td>
        </tr>
    </tbody>
</table>
<input id="save" type="button" name="save" value = "Save"><br>
</form>

然后我使用 jquery 检查空格和警告。如果所有检查都正常,我如何将数据传递到要求用户在保存到数据库之前查看的 php 页面?任何方向将不胜感激。谢谢你。

4

1 回答 1

0

改变

<form action = "" method = "POST">

 <form action = "actionpage.php" method = "POST">

在 actionpage.php 中使用 POST 获取值:-

$gender= $_POST['gender'];
$name= $_POST['name'];
and so on...............

现在回显此信息以将其显示给用户并包括 2 个按钮“确认”和“取消”。如果用户单击确认将其存储在数据库中,则将其重定向回表单页面。

于 2013-04-01T16:25:22.223 回答