I created this to test the connection to my ms sql server with a web page. I can connect with isql with out fail.
when I open this I get
PHP SQL Test
END PHP SQL Test
I was expecting to get sql data between the above lines. What am I doing wrong.
<html> <head> <title>PHP SQL Test</title> </head> <body> <p> PHP SQL Test </p> <? $conn =odbc_connect("datasource","user","password"); if(!$conn) { exit("Connection Failed: " . $conn); } $sql="SELECT top 10 * from WIP_master"; $rs =odbc_exec($conn,$sql); print_r($rs); if(!$rs){ exit("Error in SQL"); } odbc_close($conn); ?> <p> End PHP SQL Test </p> </body> </html>