How to use PHP & Access (odbc) Display Multiple Column This is tutorial php developers how to using PHP list data from Microsoft Access table and display result of multiple column.
ShotDev Focus:
- PHP & Microsoft Access list data and multiple column.
Example
php_access_multiple_column.php
<html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <? $objConnect = odbc_connect("mydatabase","",""); $strSQL = "SELECT * FROM gallery"; $objExec = odbc_exec($objConnect, $strSQL); echo"<table border=\"1\" cellspacing=\"1\" cellpadding=\"1\"><tr>"; $intRows = 0; while($objResult = odbc_fetch_array($objExec)) { echo "<td>"; $intRows++; ?> <center> <img src="shotdev/<?=$objResult["Picture"];?>"><br> <?=$objResult["GalleryName"];?> <br> </center> <? echo"</td>"; if(($intRows)%2==0) { echo"</tr>"; } } echo"</tr></table>"; ?> </body> </html> <? odbc_close($objConnect); ?>
Create a php file and save to path root-path/myphp/
Run
http://localhost/myphp/php_access_multiple_columnn.php
Screenshot