1

我正在学习PHP,如果我使用 java 脚本,我会得到 0;因此限制。

所以我需要将唯一$row["userName"]的锚标签传递给modal.

// I can use my $row["userName"] here to give each profile, an edit button unique to them.
echo    '<span class="pull-right text-muted">
                                        <a class="" href="#" data-toggle="modal" data-target="#adminEdit" onclick="" >
                                            <i class="fa fa-edit"></i> Edit user
                                        </a>
                                    </span>';

我需要$row[userName]在用户名中显示这里input

echo '<div id="adminEdit" class="modal fade" tabindex="-1" role="dialog">
            <div class="modal-dialog" role="document">
                <form role="form" method="post" action="profiles.php?from=pictureUpload" enctype="multipart/form-data">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title">Admin editor</h4>
                    </div>
                    <div class="modal-body">
                            <div class="form-group">
                                <label>Username</label>
                                <input class="form-control disabled" disabled value="   ---  RIGHT HERE ---">
                            </div>

// More stuff below omited for sizing reasons.

目前我正在考虑把我的modalOUT echo; 但是我仍然不知道如何将$row[]from 标记传递给模态

任何想法,将不胜感激,因为我自己全力以赴。~谢谢:)

4

0 回答 0