dsnless connection

hi
i have this dsn less mssql server connection on a webserver in my intranet:
//===========SERVER CONNECTION===========

$server="localhost,1433";
$username="sa";
$password="";
$database="Northwind";

//===========SERVER CONNECTION===========

but now i want to connect to another mssql server on another machine on my intranet. i tried to use instead of the server localhost the computername or the sql server name of the other machine but nothing! it keep giving me errors.

some help please!!!!!!
eawebAsked:
Who is Participating?
 
mpemberton5Commented:
First off, this is a totally separate question, which should be posted under the PHP forum as a separate question.  That said, I'll give you a link that might help you understand how PHP does feedbacks (which appears to be your problem).

http://www.w3schools.com/php/php_forms.asp

0
 
deepaknetCommented:
What error are you getting?
0
 
eawebAuthor Commented:
these are the errors i get:

Warning: mssql_connect() [function.mssql-connect]: message: Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in D:\www\webroot\evmel\php\mssql.php on line 14

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: saldis21,1433 in D:\www\webroot\evmel\php\mssql.php on line 14

Warning: mssql_select_db(): supplied argument is not a valid MS SQL-Link resource in D:\www\webroot\evmel\php\mssql.php on line 15

Warning: mssql_query() [function.mssql-query]: message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in D:\www\webroot\evmel\php\mssql.php on line 29

Warning: mssql_query() [function.mssql-query]: Unable to connect to server: (null) in D:\www\webroot\evmel\php\mssql.php on line 29

Warning: mssql_query() [function.mssql-query]: A link to the server could not be established in D:\www\webroot\evmel\php\mssql.php on line 29

Warning: mssql_fetch_array(): supplied argument is not a valid MS SQL-result resource in D:\www\webroot\evmel\php\mssql.php on line 30


if i use the sql sever name on the webserver self , it's no problem but if i use the name of the sql server on the other network machine, BAM ERRORS!!!!!!!!

example: with this no problem either. WORKS FINE!!
salbko92 is the computer name and name of the sql server on the webserver
$server="salbko92,1433";
$username="sa";
$password="";
$database="Northwind";
0
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
mpemberton5Commented:
From my recollection, there are three different types of authentications available on MSSQL.  Windows auth, MSSQL auth, and a combination of both.  My guess is that this other server may be set to Windows only and you'll need to provide windows auth credentials to connect to it.

You can set the other server to use both auth methods, but it'll require a restart.
0
 
eawebAuthor Commented:
i cannot set it to mix mode in the security. i click on the option and then ok, but when i review the properties again it is set bek to windows only
0
 
mpemberton5Commented:
Seems like there is another step to take.  Although I have never done this personally, it does seem that this is the practiced method to change over the authentication.  I don't know why the registry has to be edited, but it's MS....

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q285097
0
 
eawebAuthor Commented:
ok thanks i will look at the web page.

now this problem

<input name="buttonSearch" type="submit"  id="buttonSearch" value="Search">

if($buttonSearch == "Search"){
$sqlquery="SELECT companyName FROM Customers WHERE companyName = 'Island Trading';";

//===========SQL QUERY===========


//===========QUERY RESULTS===========

$results= mssql_query($sqlquery);
while ($row=mssql_fetch_array($results)){
echo $row['companyName']."<br>\n";}

}

what is the problem here because i'am still getting an error on submit.
Error
Notice: Undefined variable: buttonSearch in D:\www\webroot\evmel\projects\listcontrol\search.php on line 101


where do i have to declare the variable
0
 
eawebAuthor Commented:
i want the query in php be executed when clicking on submit
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.