我已经在我的网站上安装了Beauty Contact弹出表单Wordpress插件,并希望在mysql\\u fetch\\u array循环中使用原始源代码(或更好的方式访问表单),如下所示:
<?php
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into tabs
echo "<div class=\'tab-tall\'><ul id=\'tab"; echo htmlspecialchars($row[\'layouttype\']); echo "\'>
<li><a style=\'font-size:;\' class=\'textBig heading\'>"; echo htmlspecialchars($row[\'heading\']); echo "</a></li>
<li><a style=\'font-size:;\' class=\'textBig supplier\'>"; echo htmlspecialchars($row[\'supplier\']); echo "</a></li>
<li><a style=\'font-size:;\' class=\'url\' target=\'_blank\'>"; echo htmlspecialchars($row[\'url\']); echo "</a></li>
<li><a style=\'font-size:;\' class=\'email\' target=\'_top\'>"; echo htmlspecialchars($row[\'email\']); echo "</a></li>
<li><a style=\'font-size:;\' class=\'summary\'\'>"; echo htmlspecialchars($row[\'summary\']); echo "</a></li>
<li><a class=\'img relink\'><img src=\'"; echo htmlspecialchars($row[\'linked_image\']); echo "\' /></a></li>
</ul></div>";
}
?>
我在想,调整插件发出的原始html,然后以某种方式将其添加到提取电子邮件[\'email\']中-
<a class=\'email\' href=\'javascript:TagPopup_OpenForm("TagPopup_FormContainer","TagPopup_FormContainerBody","TagPopup_FormContainerFooter");\'><?php htmlspecialchars($row[\'email\']); ?></a><div style="display: none;" id="TagPopup_FormContainer"><div id="TagPopup_FormContainerHeader"><div id="TagPopup_FormClose"><a href="javascript:TagPopup_HideForm(\'TagPopup_FormContainer\',\'TagPopup_FormContainerFooter\');">X</a></div><div id="TagPopup_FormTitle"> Wanted Ad Reply </div></div><div id="TagPopup_FormContainerBody"><form action="#" name="TagPopup_Form" id="TagPopup_Form"><div id="TagPopup_FormAlert"> <span id="TagPopup_alertmessage"></span> </div><div id="TagPopup_FormLabel_Page"><input name="TagPopup_name" class="TagPopup_TextForm" type="text" id="TagPopup_name" Placeholder="Your Name" maxlength="120"></div><div id="TagPopup_FormLabel_Page"><input name="TagPopup_mail" class="TagPopup_TextForm" type="text" id="TagPopup_mail" Placeholder="Your Email" maxlength="120"></div><div id="TagPopup_FormLabel_Page"><textarea name="TagPopup_message" class="TagPopup_TextArea" rows="3" id="TagPopup_message" Placeholder="Enter Your Message"></textarea></div><input type="hidden" id="TagCorrectsum" name="TagCorrectsum" value="11"/><div id="TagPopup_FormLabel_Page" class="TagPopup_Human" > Verify Human: 3 + 8 = </div><input name="TagPopup_captcha" class="TagPopup_TextForm" type="text" id="TagPopup_captcha" Placeholder="Enter the sum eg: 1+1=2" maxlength="120"><div id="TagPopup_FormLabel_Page"><input type="button" name="button" class="TagPopup_Button" value="Submit" onClick="javascript:TagPopup_Submit(this.parentNode,\'http://www.mewanted.com\');"></div></form></div></div><div style="display: none;" id="TagPopup_FormContainerFooter"></div></a>
SO网友:filype
如果我理解正确,您希望html位于循环内的链接中,在这种情况下,最好使用?>
粘贴HTML并再次启动php脚本。
这看起来像这样:
<?php
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $result )) {
// Print out the contents of each row into tabs
echo "<div class=\'tab-tall\'><ul id=\'tab"; echo htmlspecialchars($row[\'layouttype\']); echo "\'>
<li><a style=\'font-size:;\' class=\'textBig heading\'>"; echo htmlspecialchars($row[\'heading\']); echo "</a></li>
<li><a style=\'font-size:;\' class=\'textBig supplier\'>"; echo htmlspecialchars($row[\'supplier\']); echo "</a></li>
<li><a style=\'font-size:;\' class=\'url\' target=\'_blank\'>"; echo htmlspecialchars($row[\'url\']); echo "</a></li>";
?>
<li>
<a class=\'email\' href=\'javascript:TagPopup_OpenForm("TagPopup_FormContainer","TagPopup_FormContainerBody","TagPopup_FormContainerFooter");\'><?php htmlspecialchars($row[\'email\']); ?></a><div style="display: none;" id="TagPopup_FormContainer"><div id="TagPopup_FormContainerHeader"><div id="TagPopup_FormClose"><a href="javascript:TagPopup_HideForm(\'TagPopup_FormContainer\',\'TagPopup_FormContainerFooter\');">X</a></div><div id="TagPopup_FormTitle"> Wanted Ad Reply </div></div><div id="TagPopup_FormContainerBody"><form action="#" name="TagPopup_Form" id="TagPopup_Form"><div id="TagPopup_FormAlert"> <span id="TagPopup_alertmessage"></span> </div><div id="TagPopup_FormLabel_Page"><input name="TagPopup_name" class="TagPopup_TextForm" type="text" id="TagPopup_name" Placeholder="Your Name" maxlength="120"></div><div id="TagPopup_FormLabel_Page"><input name="TagPopup_mail" class="TagPopup_TextForm" type="text" id="TagPopup_mail" Placeholder="Your Email" maxlength="120"></div><div id="TagPopup_FormLabel_Page"><textarea name="TagPopup_message" class="TagPopup_TextArea" rows="3" id="TagPopup_message" Placeholder="Enter Your Message"></textarea></div><input type="hidden" id="TagCorrectsum" name="TagCorrectsum" value="11"/><div id="TagPopup_FormLabel_Page" class="TagPopup_Human" > Verify Human: 3 + 8 = </div><input name="TagPopup_captcha" class="TagPopup_TextForm" type="text" id="TagPopup_captcha" Placeholder="Enter the sum eg: 1+1=2" maxlength="120"><div id="TagPopup_FormLabel_Page"><input type="button" name="button" class="TagPopup_Button" value="Submit" onClick="javascript:TagPopup_Submit(this.parentNode,\'http://www.mewanted.com\');"></div></form></div></div><div style="display: none;" id="TagPopup_FormContainerFooter"></div></a>
</li>
<?php
echo "<li><a style=\'font-size:;\' class=\'summary\'\'>"; echo htmlspecialchars($row[\'summary\']); echo "</a></li>
<li><a class=\'img relink\'><img src=\'"; echo htmlspecialchars($row[\'linked_image\']); echo "\' /></a></li>
</ul></div>";
}
?>
SO网友:Stephen Chernishov
//我发现我可以将下面的代码直接放入美容联系人弹出表单中。php,并使表格工作以及美丽的弹出窗口。然后考虑通过编辑mysql\\u fetch\\u数组结果和@wp\\u邮件来调整现有插件以运行。
//但愿我知道更多。他熬夜了半天,希望弄明白如何通过下面的脚本循环联系人弹出式表单,该脚本从数据库中提取联系人详细信息并显示出来(将“echo htmlspecialchars($row[\'email])”);将“echo”替换为指向弹出式表单和电子邮件不同内容的链接)。下面是获取数组代码-
“echo htmlspecialchars($行[\'heading]);echo“”;echo htmlspecialchars($行[\'supplier]);echo“”;echo htmlspecialchars($行[\'url]);echo“”;echo htmlspecialchars($行[\'email]);echo“”;echo htmlspecialchars($行[\'summary]);echo“”;///打赌其他人知道一种简单的方法