Create a clickable link in php from sql results

后端 未结 3 1332
醉梦人生
醉梦人生 2021-01-17 01:29

I am trying to make the results from mysql results clickable links in php. I am new to php and please help.



        
3条回答
  •  终归单人心
    2021-01-17 01:48

    while ($info = mysql_fetch_array($data)) {
        echo ''.$info['title'].'';
        echo " 
    "; echo $info['descr']; echo "
    "; echo "
    "; }

    Then in somefile.php, use $_GET to capture the id and show the results

    $id = $_GET['id'];
    // pull info from db based on $id
    $sql = mysql_query('SELECT * FROM items WHERE ID = "'.$id.'"');
    .
    .
    .
    .
    

提交回复
热议问题