我有一個數據庫,並且當查詢與我們的數據庫中的任何內容不匹配時,我試圖將我的電子郵件地址顯示爲超鏈接。我用下面...如何在php結果中顯示超鏈接的電子郵件
PHP代碼...
else{ // if there is no matching rows do following
echo "<br /><br /><br /><strong><h2>"."You have searched a term that is not in the database. Please contact <a href=\"mailto:[email protected]" . htmlentities($_POST['[email protected]']) . "\">".htmlentities($_POST['[email protected]']) . "</a>, if you think this term should be added."."</h2></strong>";
但是,結果我得到這個樣子...
「您搜索這個術語不在數據庫中,如果你認爲應該加上這個術語,請聯繫。「
除了超鏈接的電子郵件地址,一切都在那裏。
想法?
您的解決方案非常完美。爲什麼要刪除'$ _POST []'? – webfrogs
爲什麼你添加了$ _POST?如果郵件地址不是用表單發送的(這對我來說沒什麼意義..)你不必使用$ _POST – Philipp
好的。我很困惑。謝謝。 3分鐘以標記爲正確。 – webfrogs