wkid87 Posted October 26, 2009 Share Posted October 26, 2009 Hello, I'm new here and I hope you all are able to help me. I'm trying to connect to an SQL server via PHP but for some reason when I tried to load the file I'm getting page can not be found. <?php include 'adodb.inc.php'; ?> <html> <head> <?php function test_insert() { $con = mssql_connect('','',''); mssql_select_db('', $con); $sql = "insert into [eduusers] ([user],[pwd],[lvl],[sess],[fname],[lname],[email]) values ('username','password','1','sess','fname','lname','email')"; $res = mssql_query($sql,$con); if (!$res) { $txt = "SQL statement failed with error:<br />"; $txt .= mssql_get_last_message()."<br />"); } else { $txt = "One data row inserted:<br />"; $txt .= $sql."<br />"; } mssql_close($con); return($txt); } ?> </head> <body> Hello World: testing insert:<br /> <?php echo (test_insert()); ?> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/179064-phpmssql-page-not-loading/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.