473,795 Members | 2,605 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MSSQL arguments in PHP

89 New Member
Hello!

I am not at all good at sql, so can anyone tell me what this error i get means.......

Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in d:\WebHoteller\ printline\www\b acon\login.php on line 19

Warning: mssql_fetch_arr ay(): supplied argument is not a valid MS SQL-result resource in d:\WebHoteller\ printline\www\b acon\login.php on line 20

Warning: mssql_query(): supplied argument is not a valid MS SQL-Link resource in d:\WebHoteller\ printline\www\b acon\login.php on line 30

Warning: mssql_num_rows( ): supplied argument is not a valid MS SQL-result resource in d:\WebHoteller\ printline\www\b acon\login.php on line 31

My login.php file:

session_start() ;
$badID = false;
session_registe r("LoggedIn") ;
$_SESSION['LoggedIn'] = true;
$cUser = "";
if (isset($_COOKIE['cUserLogin'])) {
$cUser = $_COOKIE['cUserLogin']; }
if(!empty($_POS T['key'])) {
$a = $_POST['txtUserID'];
$b = $_POST['txtPassword'];
include("./connopenphp2.in c");
session_registe r("UserID");
$_SESSION['UserID'] = $a;
$_SESSION['Password'] = $b;
session_registe r("Password") ;

$query = "select * from SysParms";
Line 19 $result = mssql_query($qu ery,$conn);
Line 20 $SysParms = mssql_fetch_arr ay($result);
session_registe r("WebCompanyNa me");
$_SESSION['WebCompanyName '] = trim($sysparms['WebName']);
session_registe r("WebName");
$_SESSION['WebName'] = trim($sysparms['WebName']);
session_registe r("DisplayState ");
$_SESSION['DisplayState'] = Trim($sysparms['DisplayState']);

$errormessage = "";
$query = "select * from USERINFO where (UserID = '" . $a . "' and Password = '" . $b . "')";
Line 30 $result = mssql_query($qu ery,$conn);
Line 31 if (mssql_num_rows ($result) > 0) {
$userinfo = mssql_fetch_arr ay($result);
if (trim($userinfo['UserActive']) == 'I') {
$errormessage = "Your Login ID has not been activated yet. Please try later.";
$badID = true;
}
if ($userinfo['UserActive'] != 'I') {
if (@$_POST['chkSaveCookie'] == "ON") {
setcookie("cUse rLogin", $a);
} else {
setcookie("cUse rLogin", "");
};
session_registe r("SalesRepID") ;
$_SESSION['SalesRepID'] = $userinfo['SalesRepID'];
session_registe r("ShowDetails" );
$_SESSION['ShowDetails'] = $userinfo['ShowMoveDetail s'];
$_SESSION['LoggedIn'] = true;
session_registe r("CurrentlyLog gedInUser");
$_SESSION['CurrentlyLogge dInUser'] = $userinfo['FirstName'] . " " . $userinfo['LastName'];
@include("searc h0.php");
return;
}
}
else {
$badID = true;
}
}
Sep 26 '06 #1
0 4136

Sign in to post your reply or Sign up for a free account.

Similar topics

11
4398
by: badz | last post by:
Hi frenz Lately I try to use MSSQL and PHP , the problem arise when PHP try to read MSSQL field with 'image' data type, header("Content-type: image/jpeg"); // act as a jpg file to browser I try to used normal working file that store BLOB as file type in MSSQL ...but still not working. Is it because the image data type in MSSQL can not be recognise by PHP?
7
23877
by: mj | last post by:
Hello, thanks for the help. I am running a WinXP Pro w/ SP2 (my home computer, with ZoneAlarm firewall) Apache 2.0.52 MySQL 4.1.7 PHP 5.1.0-dev I have developed a PHP/MySQL web app that tracks jobs for me, and we
1
2109
by: JackTorrance | last post by:
Hi i have a problem with IIS6 and MSSQL and i hope that someone can help me. this is the configuration: Windows 2003 IIS6 MSSQL 7.0 Standard Edition ADO 2.5
14
2473
by: Kukurydz | last post by:
I've got such problem: My database is stored on MSSQL Server. I have to write reports for it in MSAccess. I've got a problem with creating a query which will select records from MSSQL table with date and time values from given range. The difficulty is mainly caused by the fact, that Date and Time is stored in separate rows as String . I've tried to use CDate() function in my query, but it worked well only during tests on small table (about...
3
4331
by: gharmel | last post by:
I'm trying to get some clues on why I get (much) slower responses from my PHP applications when dealing with a remote sql server as opposed to a local sql server. Here's my situation: Server #1 MSSQL 2000 sp4 Windows 2000 Server PHP4 on IIS5 (CGI)
11
31772
by: ralphie | last post by:
hi all since nearly 2 days i fight with mssql and utf-8 as i need to store and retrieve arabic characters. i tried the com approach http://groups.google.com/group/mailing.www.php-dev/browse_thread/thread/69f90dc978763e99/d61aa0bd48de23f0?lnk=st&q=php+mssql+utf-8&rnum=7#d61aa0bd48de23f0 i tried as well the odbtp library, odbc and obviously the mssql native
2
9298
by: jblankenburg | last post by:
Please help! I am hunting high and low for an equivalent function for MSSQL's DATENAME function. Here's the spec on the function from MSSQL's Books Online: DATENAME Returns a character string representing the specified datepart of the specified date.
0
1518
by: DariuszK | last post by:
I am greeting I would like to consult the better solution(with security consideration) to the access is for MSSQL(2005) from ASP(Classic) in the system of the intranet. a) SQL mixed mode and depositing user name and passwords for MSSQL of the server in "connection string" (with open text) b) Windows Authentication and to send rights to SQL of the server for IUSR_computername c) ?
0
1447
by: Derftics | last post by:
Hi Guys, Is there anyone who have tried installing MSSQL 2000 and MSSQL 2005 servers in one desktop computer? I have tried using MSDE and successfully install the MSSQL 2000 server but when I tried installing MSSQL 2005, it allows only the client tools. I have revert the process and successfully install MSSQL 2005 server but now the MSDE was prompting me an error. Is possible to install both versions of MSSQL servers in one desktop...
14
2934
by: guswebb | last post by:
Hi. I'm a newbie to PHP and am having a few problems as follows... I have installed PHP successfully on server 1 which is running IIS 6 (W2k3) and hosting multiple sites, some of which connect to MSSQL 2k (SP4) on server 2 (using ASP). I can load a basic 'Hellow world' PHP page hosted on server1 but when I add the code to create a simple connection to MSSQL on server 2, my PHP doesn't seem to connect nor output any of the desired query...
0
10213
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10163
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10000
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9040
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7538
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5436
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5563
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4113
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3722
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.