Where may I host my php/mysql web site ?

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Aug 08, 2011 11:25 am


Postby hmpjoy » Mon Aug 08, 2011 11:50 am

Hi, I am trying to access the SQL Server 2005 with PHP. For that I have activated IIS 7 on the windows small business server, for PHP. Now I have the following code for local web hosting :


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<meta http-equiv="refresh" content="2";url="index.php";>
<title>Trial 1</title>

:: B List ::


$now = time();
echo $now;

$link = mssql_connect("SRVR name", "local host \ user name", "password");

if (!$link)
die('ERROR: Could not connect');

mssql_select_db('database name', $link);

$query = mssql_query('SELECT B_No, FROM dbo.B_LIST WHERE B_No = 000011', $link);

if (!$query)
die('MSSQL error');

$row = mssql_fetch_row ($query);

echo $row;



In this I am just trying to print one row from the database on the webpage
Correct me if I am wrong, as I am coding PHP for the first time with online help.

When I try to access the webpage on the explorer I only get the title and the page if refreshed every 2 seconds , and the time is displayed. Nothing is available from database.

Thank you.

User avatar
php-forum GURU
php-forum GURU
Posts: 2196
Joined: Wed Oct 06, 2010 11:19 am
Location: Happy Valley, UT


Postby egami » Tue Aug 09, 2011 4:20 am

Check your log file for errors. If you didn't compile MsSQL into PHP, then it won't work.

Return to “Hosting - Shared and Dedicated server Solutions”

Who is online

Users browsing this forum: No registered users and 1 guest