Jump to content

drunkpanda

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by drunkpanda

  1. [!--quoteo(post=362786:date=Apr 8 2006, 07:14 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 8 2006, 07:14 AM) [snapback]362786[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    Im not sure why your're getting the error you're recieving. Could you change your MySQL conntect code to this:
    [code]$sql = mysql_connect('localhost','root') or die("Cannot Connect to MySQL: " . mysql_error());[/code]
    Did you get a different error message this time? If so could you post the full message here.
    [/quote]

    I change everything just like you said but

    [code]Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\wamp\www\PHPFreaks\login.php on line 16

    Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\wamp\www\PHPFreaks\login.php on line 16
    Access denied for user 'ODBC'@'localhost' (using password: NO)

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in C:\wamp\www\PHPFreaks\login.php on line 21
    [/code]

    thank you
    drunkpanda
  2. first I want to thank you

    [!--quoteo(post=362614:date=Apr 7 2006, 01:48 PM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Apr 7 2006, 01:48 PM) [snapback]362614[/snapback][/div][div class=\'quotemain\'][!--quotec--]
    How are you connecting to your MySQL database? As this the reaosn why you're getting this error:

    [i]Access denied for user 'ODBC'@'localhost' (using password: NO)[/i]

    And yu are getting the secound error because your SQL syntax is wrong. This is what it should be:
    [code]$validate = mysql_query("SELECT * FROM members WHERE username = '$username' AND password = md5('$password') AND verified = '1'");[/code]
    [/quote]

    how I connect to my MySQL database?
    [code]<?php
    //connect to mysql
    $sql = mysql_connect('localhost','root');

    //select database: PHPFreaks
    mysql_select_db('PHPFreaks',$sql) or die(mysql_error());
    ?>
    [/code]
    I didn't setup password, because I doing it on my computer as practice so
    I don't think thats necessary


    About my SQL error. The sounds interesting. because I got the syntax from a book call
    "Creating Interactive Websites with PHP Web Services" and the author is [b]Eric Rosebrock[/b]
    which I think is the owner of this website.

    thank you
    Drunkpanda
  3. I got error message like this:

    1. [!--coloro:#FF0000--][span style=\"color:#FF0000\"][!--/coloro--]Access denied for user 'ODBC'@'localhost' (using password: NO) [!--colorc--][/span][!--/colorc--]
    2. Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in
    C:\xampp\xampp\htdocs\xampp\PHPFreaks\login.php on line [b]21[/b]


    [code]

    include $_SERVER['DOCUMENT_ROOT'].'/XAMPP/PHPFreaks/layout.php';

    switch($_REQUEST['req']){
        case "validate":
            
            $username = $_POST['username'];
            $password = $_POST['password'];
            
            print $username." ". $password."<br />";
            
            $validate = @mysql_query("SELECT * FROM members
                                      WHERE username = '$username')
                                      AND password = md5('$password')
                                      AND verified = '1' ");
                                      
             echo mysql_error()."<br />";                      
             echo $validate."don't tell me there is nothing";
            
            
            if(mysql_num_rows($validate) == 1){         <------------- Line 21
                     ....................... more
    [/code]
    XAMPP for Windows
    -MySQL 5.0.18
    -Apache 2.2.0
    -PHP 5.1.1
    -phpMyAdmin 2.7.0 pl1

    I have tired to google the error but I couldn't find the solution
    can somebody help me with it
    thank you
    drunkpanda

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.