douchuifk90315 2015-01-21 08:24
浏览 18

使用锚标签进行数据传输

I am building a module in php in which i can see and access all the user on my website,For this i am importing all the names of the user from database and creating anchor links for them at the same time.Now i want to bind data to these links so that i can access that data on another page but the data should not be displayed in the URL I.E. i am looking for an alternate way for this pattern.since i don't want to share that data in URL.

loginatmpt.php?count='.$attempt.'

<?php
if(!$result){
        echo 'Error fetching data';
        exit();
    }
    
    while ($row = mysqli_fetch_array($result))
    {
        
        echo "<br><a href=mem_profile.php>".$row['firm_name']."</a>";
    }
    
?>

</div>
  • 写回答

2条回答 默认 最新

  • douci6541 2015-01-21 08:35
    关注

    If you want to transmit the data but not have it in the URL, you could use HTTPPost (instead of GET, which is what you are doing when you add the parameters to the URL) The data you transmit would still be visible in the source code though. If you have a security issue (i.e. sensible data) you should not have it in the HTML (or javaScript) of your page at all, meaning to get that data from the server when it is needed (and properly authorized)

    评论

报告相同问题?

悬赏问题

  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图