Loading in one page

There is a peoples table and id text code columns. The test.php file contains references to codes “3”, “4”, “5”. How to make it so that when link 3 is clicked, the file is reloaded and a list of text that has code 3 is displayed?

I hope someone has done this and has a concrete example to share. Thanks in advance.


Answer 1, authority 100%

I almost did not understand the question, but I will try to answer. If I’m wrong, don’t downvote.

  <?
    $ = $_POST['code'];
    $sql = mysql_query('SELECT id, text, code FROM `peoples` WHERE `code` = '.$c) or die (mysql_error()); 
    print"<table width='100%' border='1'>";  
    $i=1;
    while($r = mysql_fetch_array($sql)){
    print "<tr><td width='10%'>".$i."</td><td width='90%' align='center'>".$r['text']."</td></tr>";
    $i++;
    }
    print"</table>";
    ?>

Examples link <a href='index.php?code=3'> Code 3 </a>