first of all jroscoe, dont cross post, the same post is present in http://www.phpbuilder.com/board/showthread.php?threadid=10240389
and the problem in the code is that u have defined the
function sqllookup($table,$cust_nbr)
but you have not called the function anywhere so do this at the end of the function.
function sqllookup($table,$cust_nbr) {
$conn_id = odbc_connect("sqlserverNGPS","appngph","vorfa") or die ('Did not connect to the database');
print "Hello";
$sql = "SELECT * FROM '$table' WHERE CustNbr = $cust_nbr";
print $sql;
$result=@odbc_do($conn_id, $sql);
$numrows = "0";
for ($i=1; $i<= $numrows; $i++) {
odbc_fetch_row($result,$i);
$sql_last_nme = odbc_result($result,"LST_NME");
}
}
sqllookup($table,$cust_nbr) ;
reg
kevin