/ Published in: PHP
Modify includes to connect and select to provide correct result set
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php include 'config.php'; include 'opendb.php'; $select = "SELECT * from table_name"; for ( $i = 0; $i < $fields; $i++ ) { } { $line = ''; foreach( $row as $value ) { { $value = "\t"; } else { $value = '"' . $value . '"' . "\t"; } $line .= $value; } } if ( $data == "" ) { $data = "\n(0) Records Found!\n"; } print "$header\n$data"; ?>