PHP-带有变量的回显超链接不可单击 [英] PHP - echo hyperlink with variable is not clickable

查看:79
本文介绍了PHP-带有变量的回显超链接不可单击的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我试图用变量来回显超链接,但结果是我无法单击该链接,它只是普通的文本.
对于上下文,这是从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.

推荐答案

row [' 客户端'] .. ' >' .get_row_val( 用户" id"
row['client'].'">'.get_row_val("users","id",


row [客户端']).' </a>';
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.


这篇关于PHP-带有变量的回显超链接不可单击的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆