SunQuest
           Database Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesDatabase Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old February 6th, 2003, 08:29 PM
straw straw is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Stockholm, Sweden
Posts: 10 straw User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
It works fine with mysql but not with mssql, way?

Hey people!

Is there some one how can help me with this.
I have made i forum with a login in php and mysql.
Now i have to make it work with mssql but i get a error that says:
Warning: Use of undefined constant password - assumed 'password' in Catawebbarwww.tradgard.orgroottradgardlogin.php on line 3

Warning: Undefined index: password in Catawebbarwww.tradgard.orgroottradgardlogin.php on line 3

And here is the code:
php Code:
Original - php Code
  1.  
  2. <?
  3.  
  4. if ($_POST[password]) {
  5.  
  6.    include("common.php");
  7.    $link = dbConnect();
  8.    $query="SELECT * FROM user";
  9.    $result=mssql_query($query) or die(mssql_error());
  10.    $row = mssql_fetch_array($result);
  11.  
  12.  
  13.    if ($_POST[password] == $row[password]) {
  14.  

I have never made anything with mssql so i dont know if the connection is right but what i understund from the php.net is that i have to change the mysql_query to mssql_query, i hope thats right.

Looking forward to see what i have done wrong.
Best regard
Micke

Reply With Quote
  #2  
Old February 7th, 2003, 12:46 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: It works fine with mysql but not with mssql, way?

I don't think it has anything to with mssql..try this:

php Code:
Original - php Code
  1. if (isset($_POST['password'])) {
  2.  
  3.    include("common.php");
  4.    $link = dbConnect();
  5.    $query="SELECT * FROM user";
  6.    $result=mssql_query($query) or die(mssql_error());
  7.    $row = mssql_fetch_array($result);
  8.  
  9.  
  10.    if ($_POST['password'] == $row['password']) {

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesDatabase Help > It works fine with mysql but not with mssql, way?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway