web 2.0

How to use PHP & Access (odbc) Display Multiple Column

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

PHP Microsoft Access (Display Multiple Column)
.
.
.

Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.