Hi ya Cronix,
No it's actually this just incase it will help out anyone else - it now takes input from the webpage - calls the Stored Procedure and then dumps it out with a record count
I've also coded some other routines now that will populate Tables from a Webpage Via a Stored Procedure - Hopefully make things less hackable.
Cheers All
<?PHP
// Set up strings here for DB and Server connections
$dbhandle = mssql_connect($myServer, $myUser, $myPass) or die("Couldn’t connect to SQL Server on $myServer"); $selected = mssql_select_db($myDB, $dbhandle) or die("Couldn’t open database $myDB"); echo $_GET['timestr']; $StartDate = $_GET['timestr']; //$StartDate = '2015-01-01'; test string $result = mssql_query("EXEC dbo.qselGetMonthDays @StartDate = '$StartDate'", $dbhandle); $numRows = mssql_num_rows($result); echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";
while( $row = mssql_fetch_object( $result ) ) { echo $row->DateField . " " . $row->DayField; echo '</br>'; }
mssql_close($dbhandle); ?>