简体   繁体   中英

display an information in a page from another page in php

I'm building a chat system and I have a list of friend display on a page, so what I want actually is to display a div with a friend username at the top of the div went the friend name is clicked as that of Facebook.

chat.php

<a href="view.php?id=<?php echo $rowf['friend_uid'].'<br>'; ?>">
<?php echo $rowf['friend_uid'].'<br>'; ?></a>

view.php

if(isset($_GET["id"])){
   echo '<div class="chat">'.$_GET[ "id"].'</div>';    
}

how will I echo data in view.php in chat by clicking on the username with a link to view.php

  1. when you click the friend name fetch the friend_id and user_id
  2. Use a query to fetch the records from message table between this two id
  3. display the fetched records in the format you wanted to print

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM