YoungManRiver
IS-IT--Management
All,
Working on PHP script to open existing "Customer Add" function to pull data from existing "ACT" .dbf file.
Here is code so far:
What I can't do is simulate the following SQL command:
So I can propogate PHP var of $comp_list to build PHP/HTML <SELECT>/<OPTION> drop-down to select the info from.
Count, from first echo, is accurate 6000+ records, but cannot figure out how to parse the $row array to get right column and value. Also tried using the "dbase_get_header_info" function, but same array parsing problem. Know the data is there, just need to know how to get it.
Here is PHP/HTML file to display:
Thanks!
YMR
Working on PHP script to open existing "Customer Add" function to pull data from existing "ACT" .dbf file.
Here is code so far:
Code:
<?php
$af = 'c:\myact.dbf';
$db = dbase_open($af, 0);
if ($db) {
$record_numbers = dbase_numrecords($db);
echo "G rec cnt => $record_numbers<br>";
for ($i = 1; $i <= $record_numbers; $i++) {
$row = dbase_get_record_with_names($db, $i);
echo "Member #$i: " . trim($row['name']) . "<br>";
}
}
dbase_close($db);
?>
Code:
SELECT DISTINCT company FROM file;
Count, from first echo, is accurate 6000+ records, but cannot figure out how to parse the $row array to get right column and value. Also tried using the "dbase_get_header_info" function, but same array parsing problem. Know the data is there, just need to know how to get it.
Here is PHP/HTML file to display:
Code:
<html>
<head>
<title>MyOps System - Invoice</title><STYLE TYPE="text/css">
<!-- BODY, P {color: black; font-family: verdana; font-size: 10 pt}
H1 {color: black; font-family: arial; font-size: 12 pt} -->
<style type="text/css">
body {background-color: #ffffff; color: #000000;}
body, td, th, h1, h2 {font-family: sans-serif;}
pre {margin: 0px; font-family: monospace;}
a:link {color: #000099; text-decoration: none; background-color: #ffffff;}
a:hover {text-decoration: underline;}
table {border-collapse: collapse;}
.center {text-align: center;}
.center table { margin-left: auto; margin-right: auto; text-align: left;}
.center th { text-align: center !important; }
td, th { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
# td.bd, th.bd { border: 1px solid #000000; font-size: 75%; vertical-align: baseline;}
h1 {font-size: 150%;}
h2 {font-size: 125%;}
.p {text-align: left;}
.e {background-color: #ccccff; font-weight: bold; color: #000000;}
.h {background-color: #9999cc; font-weight: bold; color: #000000;}
.v {background-color: #cccccc; color: #000000;}
.vr {background-color: #cccccc; text-align: right; color: #000000;}
img {float: right; border: 0px;}
hr {width: 600px; background-color: #cccccc; border: 0px; height: 1px; color: #000000;}
</style>
</head>
<BODY>
<FORM METHOD="POST" ACTION="">
<TABLE BORDER=2 CELLPADDING=5 WIDTH=400 align=center BGCOLOR="#F0F8FF" >
<TR>
<TD class=bd>
<TABLE BORDER=0 CELLPADDING=5 WIDTH=375 align=center BGCOLOR="#F0F8FF" >
<TR>
<TD class=bd colspan=6 ALIGN=center VALIGN=bottom>
<H1>MyOps System</H1>
Company Add Screen
</td>
</tr>
<tr>
<td width=50 class=bd align=right>Company:</td>
<td width=300 colspan=3 class=bd align=left>
<SELECT NAME="inv_cmp">
<?php echo $comp_list; ?>
</SELECT>
</td>
</tr>
<tr>
<td align=center colspan=6>
<INPUT TYPE="submit" NAME="submit" VALUE="Submit">
</td>
</tr>
</TABLE>
</td>
</TR>
</TABLE>
</FORM>
</BODY>
</HTML>
Thanks!
YMR