I have installed php 5, Sql server and apache all well configured.
I´m new to php programing, so now i´m only trying to connect
to a database, extract files from it and display them.
I have made a simple script to do that but the IE returns nothing,
it displays a blank page, not even an error, all is well configured
and I have tested that.
this is my script:
Code: Select all
<?php
$myServer = "06-sistemas";
$myUser = "sa";
$myPass = "password";
$myDB = "nueva";
$s = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$d = mssql_select_db($myDB, $s)
or die("Couldn't open database $myDB");
$query = "select * from tabla1";
$result = mssql_query($query);
while($tmp = mssql_fetch_array($result)) {
print $tpm["nombre"];
print "<br>";
print $tpm["edad"];
print "<br>";
}
mssql_close($s);
?>Arong
feyd | Please review how to post code using
Code: Select all
andCode: Select all
tags. Read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]