Log in refuses to work

I have a really simple log in page for admin pages of a PHP
website. Which for some reason when I key in the correct details
for the user name (colin) and password I get this error:
Unknown column 'creative' in 'where clause'
So I have tried an even simpler page with a form two fields
and a button and I still get the same error. I have changed the
page it refers you to to a plain page - same error.
Any ideas where this error is coming from? I have only used
Dreamweaver coding with no changes, so don't see what I can be
doing wrong!
<?php
require_once('../Connections/annaVrugs_Connection.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType,
$theDefinedValue = "", $theNotDefinedValue = "")
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue)
: $theValue;
$theValue = function_exists("mysql_real_escape_string") ?
mysql_real_escape_string($theValue) :
mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) .
"'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" :
"NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue :
$theNotDefinedValue;
break;
return $theValue;
mysql_select_db($database_annaVrugs_Connection,
$annaVrugs_Connection);
$query_Recordset1 = "SELECT * FROM `admin`";
$Recordset1 = mysql_query($query_Recordset1,
$annaVrugs_Connection) or die(mysql_error());
$row_Recordset1 = mysql_fetch_assoc($Recordset1);
$totalRows_Recordset1 = mysql_num_rows($Recordset1);
?><?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
session_start();
$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
$_SESSION['PrevUrl'] = $_GET['accesscheck'];
if (isset($_POST['username'])) {
$loginUsername=$_POST['username'];
$password=$_POST['password'];
$MM_fldUserAuthorization = "";
$MM_redirectLoginSuccess = "test.php";
$MM_redirectLoginFailed = "loginError.php";
$MM_redirecttoReferrer = false;
mysql_select_db($database_annaVrugs_Connection,
$annaVrugs_Connection);
$LoginRS__query=sprintf("SELECT `user`, password FROM
`admin` WHERE `user`=%s AND password=%s",
GetSQLValueString($loginUsername, "-1"),
GetSQLValueString($password, "text"));
$LoginRS = mysql_query($LoginRS__query,
$annaVrugs_Connection) or die(mysql_error());
$loginFoundUser = mysql_num_rows($LoginRS);
if ($loginFoundUser) {
$loginStrGroup = "";
//declare two session variables and assign them
$_SESSION['MM_Username'] = $loginUsername;
$_SESSION['MM_UserGroup'] = $loginStrGroup;
if (isset($_SESSION['PrevUrl']) && false) {
$MM_redirectLoginSuccess = $_SESSION['PrevUrl'];
header("Location: " . $MM_redirectLoginSuccess );
else {
header("Location: ". $MM_redirectLoginFailed );
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1" />
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var
i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2];
val=document.getElementById(args
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must
contain an e-mail address.\n';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain
a number between '+min+' and '+max+'.\n';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is
required.\n'; }
} if (errors) alert('The following error(s)
occurred:\n'+errors);
document.MM_returnValue = (errors == '');
//-->
</script>
</head>
<body>
<form id="form1" name="form1" method="POST"
action="<?php echo $loginFormAction; ?>">
<input type="text" name="username" id="username" />
<input type="password" name="password" id="password"
/>
<input name="button" type="submit" id="button"
onclick="MM_validateForm('username','','R','password','','R');return
document.MM_returnValue" value="Submit" />
</form>
</body>
</html>
<?php
mysql_free_result($Recordset1);
?>

Don't panic - I found out what to do. It seems I have to make
the database and Dreamweaver have the headings username / password.
Previously I had 'user' set in both the database and
Dreamweaver, and although it appears you can accommodate different
headings it doesn't work.
So need to spell out USERNAME and PASSWORD on both to make it
work.
C

Similar Messages

  • Thread refuses to work

    Ok, this is the weirdest thing ever happened to me ever since i started working with cellphone programming.
    Lately, one of my thread refuses to activate. I have this thread that communicates with a thermal printer to print something right. Well, i have been working developing the interpretative code for it (since the SDK won't do any good for my needs) for about 4 weeks and been working perfectly. But then i tried to implement it on my application i was working on and it refused to work. Well, i though something was wrong with my code so i went back to my test program and tried to invoke de print thread and now it also refuses to work, but i noticed on the device log (i'm developing on blackberry) a IllegalMonitorStateException was thrown in the wait() method of my thread.
    My thread is running all the time expecting for me to call it to work so it has this structure
    class printThread implements Thread
        private boolean sleep = true;
        printThread(){} // Constructor
        public void run()
             while(sleep)
                 try
                     wait();
                 catch(InterruptedException e){}
                 if(sleep)
                    // Do the work when notifyed
        public void work()
             notify();
    }Thats my basic thread structure, and been working like a charm for ages already (my application has 4 thread running backward, one of it works every 5 minutes in the background) but then i added the print thread and this problem started to appear. then i went back to my test program for the printer and the problem followed me there.
    What might this be causing the problem? I could understand this problem happening in my application with the other 4 threads working there, but on the test program there's only 1 thread!!!

    hm it looks like you lost synchronized keyword while making changes in the code.
    IllegalMonitorStateException is definitely a WYSIWYC (What You See Is What You Coded). I mean, this exception is indeed the correct behavior for the code you posted.
    Consider changing *while(sleep){...}* to something like *synchronized(this){while(sleep){...}}* - that will probably make exception go away, but...
    ... on the test program there's only 1 thread!!!...but given above, after fixing the exception you can get into the next problem - your application will hang.
    You know, it takes two to tango. While one thread waits, there should be another one to notify.
    If there's only one thread waiting, it can wait forever. I won't guarantee that this is your case though because from your explanation it is not clear if there's indeed only one thread.
    I would also recommend you to consider studying Sun's [online tutorial on concurrency|http://java.sun.com/docs/books/tutorial/essential/concurrency/]. +"...This lesson introduces the platform's basic concurrency support..."+ - studying it can help fix problems faster than waiting for the answer at the forum. :)

  • Messges often refuses to work

    I seem to have this problen all too often as Messages refuses to work. I am trying to send a message to a iOS user and it does not work and I get the red Exlamation point. I have attempted to reboot the Mac, log in and out of iMessage but it does not fix the problem. Perhaps this is a system wide issue on Apples end.

    Hi John,
    I had the iMessages arrive on my iPhone early this morning.   (Thanks Apple).
    The Mac appeared to sync this evening (my time) at 21.08.
    However I have not go the "Are you reading this" that may have been the prompt for the sync.
    As you can see I have yesterday's AIM chat still "open".
    I have not reported it.
    The Status page Apple run says there have been no issues
    http://www.apple.com/support/systemstatus/
    We are currently on British Summer Time which is GMT+ 1 hour if this helps explain what happend at 4.41 BST for me or the sync time this evening.
    9:25 PM      Friday; May 17, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • I can no longer log into my Remote Work site with Firefox, and I do not know why (I won a Mac)--can anyone tell me what might be wrong?

    For 1 1/2 years I had been able to log in to my work Remote Access site using Firefox, but I no longer can--it just sits there and does nothing. I have tried deleting the Firefox browser in case of corruption and reloaded from the Mozilla website, but that does not help. I prefer not to give the URL of my company website, but it is possible someone can help me. Might the problem be java, or something else?

    You'll have to call and explain your situation to Adobe Customer Service for your region.

  • I have created my site with Muse and have uploaded to an external ftp hosting, now my secure log in will not work because I am not using BC. Is there a way to create a secure log in that will work with out being forced to use BC?

    I have created my site with Muse and have uploaded to an external ftp hosting, now my secure log in will not work because I am not using BC. Is there a way to create a secure log in that will work with out being forced to use BC?

    Hi
    Secure Zone login feature will only work if you host your website with Business catalyst.
    Please take a look to this as an alternative
    Password Protect Pages Widget for Adobe Muse
    Also, check this thread,
    Re: Can I create a login/password protection in Muse for a HTML5 page or two?

  • ICal refuses to work

    After updating to Lion 10.7.5, iCal refuses to work: won't change day/week/month, no previously entered appointments shown, can't add any new ones either. Now what? Of course, I have no backup (didn't think I needed to with iCloud). Aim is 1) to restore function, then 2) populate back from iPod Touch Any help appreciated.

    andybacon wrote:
    After updating to Lion 10.7.5, iCal refuses to work: won't change day/week/month, no previously entered appointments shown, can't add any new ones either. Now what? Of course, I have no backup (didn't think I needed to with iCloud).
    I'll just address the backup issue, iCloud is NOT a backup system, you still need one.

  • Adobe update refuses to work for CS6 and Photoshop elements. App manager refuses to install.

    Adobe update refuses to work for CS6 and Photoshop elements. App manager refuses to install. Support Advisor is of no help.Anyone had the same problem? It has all worked perfectly for some years now, but refuses this week.Has Adobe changed something.Windows 7.

    Re: Adobe update refuses to work for CS6 and Photoshop elements. App manager refuses to install.
    created by Pat Willener in Downloading, Installing, Setting Up - View the full discussion
    What exactly means "refuses"?
    This is the message which comes up if I try to update (from the Help menu) or re-install my licenced copies of CS6 or Photoshop Elements 9.
    “We've encountered the following issues
    Installer failed to initialize.Please download Adobe Support Advisor to detect the problem”
    Get Adobe Support Advisor”
    OR
    on trying to open PhotoshopCS6 I get this message:-
    “Adobe Application Manager required to start your trial, is missing or damaged.
    Please download a new copy of Adobe Application Manager from http://www.adobe.com/go/applicationmanager_uk”
    When I follow these instructions and try and start up/install or update Photoshop CS6 I get the same messages all over again. This has been going on since Tuesday afternoon and I am anxiuous to resolve the problem. For several years now all this has worked perfectly through your website and I cannot understand what has changed.  Once I cancel these messages the products themselves seem to function OK. When I attempt to use Adobe Update Manager I get the same messages as above. You will see that my products are properly licensed and up to date. Have you any solution?

  • Microsoft Word 2008 refuses to work for me after installing the most recent Mavericks update, 10.9.1. It is 2008, yet Excel and Powerpoint work just fine. Help!

    Microsoft Word 2008 refuses to work for me after installing the most recent Mavericks update, 10.9.1. It is 2008, yet Excel and Powerpoint work just fine. Help!

    I suggest you do one of two things:
    1. Upgrade to Office 2011 for OS X.
    2. Try the freeware, Libre Office.

  • I restored my ipod touch, and now the touch screen refuses to work

    my ipod touch recently said it needed activation, although I've been using it for 18 months now. When I connected to Itunes, it said it could not read the contents of the Ipod, although it did read the model number and other details. It said to restore it to the factory settings, which I did. after restore, the touch screen refused to work. after 24, it began working, but then said it needed activation again. Hook up to Itunes, same song and dance. It is frozen again. Has anyone else had t

    You should take it to the nearest apple store to let them restore it and activate it. iTunes wouldn't dare restore my ipod touch everytime i tried to restore always an error. So the next day i took it to apple and they fixed it.

  • Volume adjust refuses to work unless FN is pressed

    I didn't start having this problem until a week or so ago. My volume refuses to work unless FN is pressed while f9 or f10 is as well. That or I have to open the function key app and then it will work without the key.
    I have windows 8 and my model is the satellite s855-s5378

    Try checking the UEFI settings for a function key mode setting. Most models have a toggle that allows you to choose wheter you want to have to hold down the FN key to access the "special" keys or hold down the FN key to access the F# keys. Try switching it.
    - Peter

  • Youtube and itunes app refuse to work

    I've got an ipod touch ..
    And i have wifi at home
    I am able to use safari but itune store and youtube features refuse to work
    every time i click on the youtube and itune icon it tells me :
    '' cannot connect to Youtube or cannot connect to Itune ''
    I find that weird because it once worked !
    Please help solve my problem .

    I am sure i am , and i know that my wifi is not he problem
    because my brother's itouch works

  • Curve 9300 Browser refuses to work?!

    Hi guys!
    Yet another fault with my BlackBerry 9300, the browser refuses to work, I have full 3G coverage and I am connected to my home wifi with an excellent connection, yet my Blackberry just refuses to connect to any websites, all I get is a message saying Unable to connect to server, have had the problem for a few days, tried the usual battery pull, turned of my network coverage and tried running off my wifi and vice versa yet ive had no luck... 
    Would be so grateful if someone had a solution, cos i really dont have the time or the energy to contact my network provider..
    Thanks

    Hi there!
    I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB...please wait for that before proceeding to the next step):
    1) Register HRT
    KB00510 How to register a BlackBerry smartphone with the wireless network
    2) Delete and Resend Service Books
    KB05000Delete the service book for the BlackBerry Internet Service email account from the BlackBerry smartphone
    KB02830 Send the service books for the BlackBerry Internet Service
    3) Batt Pull Reboot
    Anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    Hopefully that will get things going again for you! If not, then you should contact your wireless service provider for formal support.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • Logging for AS not working

    Hi,
    In sm21, I cannot see any logs from the AS. I can only see the ones from CI.
    Any ideas how to solve this issue ?
    Anything is welcomed,
    Thanks.

    Hello
    This thread was locked for the following reasons:
    1) the topic does not relate to PI. This forum is for PI technical issues only.
    2) it is against forum rules to post the same issue on multiple forums - Re: Logging for AS not working
    Regards
    Moderator

  • Keep trying to access my Hulu plus Account and it keeps telling me it's not available. It did that yesterday and then the login screen appeared (not sure how it happened) I logged in and it worked. Now today, same unavailable message comes up. Help !!!

    Keep trying to access my Hulu plus Account and it keeps telling me it's not available. It did that yesterday and then the login screen appeared (not sure how it happened) I logged in and it worked. Now today, same unavailable message comes up. Help !!!

    Try a Hard Reset.....
    Press and hold the Wake / Sleep button AND the Home button at the same time, keep them both pressed until the Apple Logo appears on the screen, it can take 10 or more seconds.  Ignore the swipe to turn off message.

  • Why has my 3G stopped working on my iphone? It is enabled, and I never had problems with it before, but for about 2 months now it has refused to work and as a result I can't send any attachments such as photos or videos via text.

    Why has my 3G stopped working on my iphone? It is enabled, and I never had problems with it before, but for about 2 months now it has refused to work and as a result I can't send any attachments such as photos or videos via text.

    Cellular data is a feature from your phone carrier.  Have you contacted them to resolve your issue.

Maybe you are looking for

  • I have a P2035N laser printer. Up until last week it worked flawlessly. I now get an error message

    saying that the printer needs troubleshooting is needed. I then click on troubleshooting and it runs a protocol which finishes by telling me the problem has not been resolved. I cannot print from word or any other program. Curiously, I downloaded a d

  • How do i get my iPhone to stop got on the blank black screen with the logo after the update in iOS 7?

    I am really having some problems with my phone after my iOS 7 update . now my phones going off and on to the apple logo. i waited for 7 hours aready please help me im just a teen who needs help on my iPhone.

  • PO document overview to delete permanently

    Hi Friends, I would like to ask simple or could be tricky questions. How could we delete OR hide "permanently" the "document overview" on PO. Every answers will be appreciated. Thanks in advance, RD

  • Method calling problem

    I dont know why this line of code is not executing dbpassword = dao.getMemberPass(username); the getMemberPass() method is not being entered. why not?? Heres some info: dbpassword is defined as a String dao is an instance of BookDAO, the interface fo

  • CATS_DA

    Hi All How can we restrict users from seeing the time / allowance records of other users when in CATS_DA?  i.e. a user should only see their own records as a default. Regards Ritu