我有一個插入到數據庫和我插入的文本有<a href=""></a>
標籤。數據庫varchar列上的超鏈接
mysql_query("INSERT INTO `pm`(`message`) VALUES('You have been Invited to the team hello Click <a href="http://localhost:8080/competitive/accept.php">here</a> to accept.')");
從柱回聲的結果是這樣的:
You have been Invited to the team hello Click href="http://localhost:8080/competitive/accept.php">here to accept.
而且我希望它看起來像這樣:
You have been Invited to the team hello Click here/*this is an link*/ to accept.
如何使其正常?
編輯:
全碼:http://jsfiddle.net/Mvpy8/ PS:不要運行剛纔看到的代碼。
我很驚訝的是,INSERT在所有工作,因爲你必須逃脫'‘'字符爲'\’'。 –
將''。team_name.''改爲'「。$ team_name。」'並且將'here'改爲'accept',以'here接受',如何輸出文本? ''。*** [提示] ***在dbl引號前添加反斜槓 –
是的,我使用的是echo – Matthew