如何将php值发送到modal

如何将php值发送到modal,php,modal-dialog,Php,Modal Dialog,我有一个返回一行值的查询 <?php $chapter_title = $story_data['chapter_title']; 我有一个href链接,单击时显示模式 echo "<a href='#deleteModal' name='$chapter_title' >delete chapter</a>"; 显示 echo "<div id='deleteModal' class='modalDialog'&g

我有一个返回一行值的查询

    <?php
    $chapter_title = $story_data['chapter_title'];
我有一个href链接,单击时显示模式

    echo "<a href='#deleteModal'  name='$chapter_title' >delete chapter</a>";   
显示

    echo "<div id='deleteModal' class='modalDialog'>
                <div>
                    <h3>Delete Chapter Confirmation </h3><h3 style = 'color:red'> $chapter_title</h3><hr>
                    <div style='display:inline-block;width:auto%'>
                        <text>You are about to delete this chapter. <br />It cannot be restored at a later time! <br />Do you still want to continue?</text>
                        <br><br>
                        <div id='create_btn'><a href=''>Delete</a></div>
                        <div id='cancel_btn'><a href=''>Cancel</a></div>
                        <br><br>
                    </div>
                </div>
    </div>";
    ?>
但是我在显示正确的$chapter_标题时遇到问题。即使单击第二行的“删除”按钮,它仍然显示第一行的标题。请帮我做什么。

代替

<h3 style = 'color:red'> $chapter_title</h3>
尝试回显内容

<h3 style = 'color:red'><?php echo $chapter_title; ?></h3>
更正

<a href='#deleteModal'  name='<?php echo $chapter_title; ?>' >delete chapter</a>  

您正在使用jQuery UI吗?一旦创建了一个模式,就必须在再次调用之前将其销毁。我没有使用任何模式。如何摧毁一个模态?很抱歉。模态在回声中。但是仍然没有什么变化你能在页面源中看到内容吗?是的,我能看到内容。我可以看到删除章节确认编辑第1章和删除章节确认编辑第2章,但在我的页面中,每当我单击删除时,我只能看到删除章节确认编辑第1章,即使我打算删除编辑第2章尝试只使用一个h3,只是为了核实,我做了,但是章节标题没有改变,他们都在phpOkay nevermind里面。您使用什么javascript插件来显示模式对话框?我没有使用任何javascript插件。只有当我单击delete href按钮时才会显示“我不使用”。我一直在浏览js,它将打开我的div pop,但我不明白。有办法吗?