How's the inpute describe the data from mySQL



  • The name should be inserted

     while ($row = mysql_fetch_array($result))
        {
    echo '<input  type="checkbox" name=.$row[5]. value="a1" checked>';
    }
    


  • while ($row = mysql_fetch_array($result))
    {
    echo '<input  type="checkbox" name='.$row[5].' value="a1" checked>';
    }
    

    And the advice is:

    mysql_fetch_array - gives the right to use the name of the column. In other words, it unites.
    mysql_fetch_assoc() and mysql_fetch_row()

    $row["название колонки таблицы"] = $row[номер колонки]




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2