Hi,
I am rebuilding a intranet site to the Drupal 7 framework (which is awsome I might add).
One of the pages returns all the purchase orders from our ERP system for a selected site.
This code is not complete, but it brings back the correct values when ran on a php page. I cannot use this code in the body of a node because of the POST element in the form submit.
What other ways are there to return the values to a node.
If I am not clear, please let me know and i will rephrase.
<?php
include 'includes/x3dbconnect.php';
if(isset($_POST['Site'])) $name = stripslashes($_POST['Site']);
$query = "SELECT FCY_0 FROM DEMOPRM.FACILITY";
$result = mssql_query($query);
echo "
";
echo "
";
//display the results
while($row = mssql_fetch_array($result))
{
echo "" . $row["FCY_0"] ."";
}
echo "
";
echo "
";
echo "Selected Site is " . $name;
$query = "SELECT POHNUM_0, POHFCY_0 FROM DEMOPRM.PORDER WHERE POHFCY_0 like '$name'";
//execute the SQL query and return records
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "
" . $numRows . " Orders" . ($numRows == 1 ? "" : "s") . " Returned
";
//display the results