Pulling data and printing it in an HTML table

前端 未结 3 2087
一向
一向 2020-12-22 08:17

From a MySQL table called \"submission\" containing the fields \"loginid, submissionid, title, url, datesubmitted, displayurl\", I would like to print an HTML table thats co

3条回答
  •  温柔的废话
    2020-12-22 09:02

    your question regards to debugging, the most important programming art. Noone can find an error for you, you have to do it yourself. With help of little tricks.

    change $profile = $_GET['profile']; to $profile = intval($_GET['profile'];)

    change $result = mysql_query($sqlStr); to

    $result = mysql_query($sqlStr) or trigger_error(mysql_error()." in ".$sqlStr);
    

    andd following 2 lines at the top of your code, run it again and see what it say. if still nothing, you don't have matching records in your table.

    ini_set('display_errors',1);
    error_reporting(E_ALL);
    

提交回复
热议问题