Hey all!!
Iv'e recently started using odbc functions to interface with my ms access database. Iv'e tested it bu pulling out simple stuff from tables etc and it all works fine.
Now that I'm actually doing what I need to do with it, Im having a few problems such as:
Warning: odbc_result(): supplied argument is not a valid ODBC result resource in c:\documents and settings\stezzy\desktop\files\projects\fsm\login.php on line 13
the variable $result holds the actual query to the database, and the variable $r is what actually pulls the data out. Line 13 is
$ID = odbc_result($r, 1);
Now Iv'e echo'd $result and $r and they've both retuned true... so why is that error occuring?
Another problem im having is with forms. Two fields.. one names "username" another named "password". When values are entered into those fields, and the form is submitted, then in the file that is the action to the form the variables $username and $password should be created, right? Well, it appears that they are not. Iv'e even tried..
$username = $HTTP_POST_VARS[username];
$password = $HTTP_POST_VARS[password];
But still no luck. The error(s) returned are:
Notice: Use of undefined constant username - assumed 'username' in c:\documents and settings\stezzy\desktop\files\projects\fsm\login.php on line 6
Notice: Use of undefined constant password - assumed 'password' in c:\documents and settings\stezzy\desktop\files\projects\fsm\login.php on line 7
But again strangly, assinging $HTTP_POST_VARS[username] to $test, and then echoing $test will display the username entered in the form. Why is this happening?
This is part of my A-Level coursework for my computers calss. Hope there's combody out there who can help.
Regards, Stezz.