Closed Thread
Results 1 to 3 of 3

Thread: Attension plz

  1. #1
    efim is offline Newbie
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    0

    Attension plz

    Because i ve not been able to resolve my previous problems, i decided to go in for something simple. I created a single table database, i have an ndex.php and login.php. I am using WAMP & dreamweaver, the server testing connection is correct as seen in my dreamweaver Local File menu.

    I checked several times the ndex.php is correct but when i fill it and submit (Login) the login.php displays a blank page, it does not echo any error message or connection massage.

    these are the codes;
    Code:
    [B]ndex.php[/B] 

    [code]

    <table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
    <tr>
    <form method="post" action="login.php">
    <td>
    <table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">

    <tr>
    <td colspan="3"><strong>  </strong></td>
    </tr>

    <tr>
    <td colspan="3"><strong>Member Login </strong></td>
    </tr>
    <tr>
    <td width="78">Username</td>
    <td width="6">:</td>
    <td width="294"><input type="text"  name="username"></td>
    </tr>
    <tr>
    <td>Password</td>
    <td>:</td>
    <td><input type="password" name="password" ></td>
    </tr>
    <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td><input type="submit" value="Login"></td>
    </tr>
    </table>
    </td>
    </form>
    </tr>
    </table>

    [/code]



     [B] login.pho [/B]

    [code] 

    <?
    $username 
    $_POST["username"];
    $password =$_POST["password"];

    if(
    $username&&$password)
    {
    $connectmysql_connect("localhost" "root""") or die("Couldn't connect!");
    msql_select_db("phplogin") or die ("couldn't find db");


    $query mysql_query(" SELECT * FROM users WHERE username='$username' ");

    $numbers mysql_num_rows("$query");

      echo 
    $numbers

    }

    else

      die(
    "Please enter a username and a password!");

    ?>
    [/code]
    Please help
    thx:
    Last edited by efim; 02-10-2010 at 10:45 AM. Reason: Please use code tags when posting code!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Feral is offline Programmer
    Join Date
    Jul 2008
    Posts
    163
    Rep Power
    15

    Re: Attension plz

    Code:
    $numbers = mysql_num_rows("$query");
    should be

    Code:
    $numbers = mysql_num_rows($query);

  4. #3
    efim is offline Newbie
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    0

    Re: Attension plz

    Thanks

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts