<?
$dbh = mysql_connect( "host", "usr", "pass");
$bol = mysql_select_db ("dbinventory",$dbh) or die("sad...");
include ('../xajax/xajax_core/xajax.inc.php');
$xajax = new xajax();
$xajax->registerFunction("getCompany");
$xajax->processRequest();
function getCompany($a)
{
$response = new xajaxResponse();
$sql1 = "SELECT * FROM `tblproduct` WHERE intID = " . $a;// ORDER BY intOrder ASC";
$res1 = mysql_query($sql1);
while ($arr1 = mysql_fetch_array($res1))
{
extract($arr1);
$html = $intID . '
' . $strCompanyName . 'br /' . $strStreet . 'br /' . $strCity . 'br /' . $strState . 'br /' . $strZip . 'br /' . $strPhone . 'br /' . $strFax . 'br /' . $strCell . 'br /' . $strEmail;
}//END WHILE
$response->assign('txtCompany', 'innerHTML', $html);
//$response->assign('reset', 'style.display', 'block');
return $html;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
</head>
<body>
<div align="center">
<table border="2" align="center" width="75%" height="85%">
<tr>
<td rowspan="2">
<?php
$sql1 = "SELECT * FROM tblproduct";// ORDER BY intOrder ASC";
$res1 = mysql_query($sql1);
while ($arr1 = mysql_fetch_array($res1))
{
extract($arr1);
echo "<a href=\"javascript:void(0)\" onClick=\"xajax_getCompany('0')\">Test Link[Product_ID] this is a test link</a>
' ;
echo "<a href=\"javascript:void(0)\" onClick=\"xajax_getCompany('" . $arr1['intID'] . "')\">" . $arr1['strProductName'] . '[' . $arr1['intID'] . ']</a>This link grabs infor from database' ;
}//END WHILE
?>
</td>
<td>
<div id="txtCompany">co info</div>
</td>
</tr>
<tr>
<td>
Product discription
</td>
</tr>
</table>
</body>