问题描述
我试图用变量来回显超链接,但结果是我无法单击该链接,它只是普通的文本.
对于上下文,这是从mysql_fetch_assoc循环生成的表的列中包含的字段.
Hi,
I am trying to echo a hyperlink with variables but the result is that I cannot click the link, its just normal text.
For context, this is a field contained in a table''s column generated from a mysql_fetch_assoc loop.
echo '<a href="users.php?cl='.$row['client'].'">'.get_row_val("users","id",$row['client']).'</a>' ;
get_row_val("users","id",$row['client'])
仅应返回用户名".
这就是我在html中得到的内容:
Is just supposed to return the "user name".
This is what I get in html:
user name<a href="users.php?cl=58"></a>
这是我通常希望得到的:
This is what I am expecting to normally get:
<a href="users.php?cl=58">user name</a>
知道为什么会发生这种情况吗,我连接字符串和变量的方式是否有问题?
感谢您的帮助.
Any idea why this is happenning, is it a problem with the way I concatenate the strings and variables?
Thanks for your help.
推荐答案
get_row_val("users","id",
应该返回用户名".
这就是我在html中得到的内容:
Is just supposed to return the "user name".
This is what I get in html:
user name<a href="users.php?cl=58"></a>
这是我通常希望得到的:
This is what I am expecting to normally get:
<a href="users.php?cl=58">user name</a>
知道为什么会发生这种情况吗,我连接字符串和变量的方式是否有问题?
感谢您的帮助.
Any idea why this is happenning, is it a problem with the way I concatenate the strings and variables?
Thanks for your help.
这篇关于PHP-带有变量的回显超链接不可单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!