User Profile

Collapse

Profile Sidebar

Collapse
nhirene
nhirene
Last Activity: Mar 25 '14, 01:50 AM
Joined: Jan 15 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • nhirene
    replied to if else
    in PHP
    why is it everytime i run this script it always display please enter username and password? is there any problem regarding my codings?
    See more | Go to post

    Leave a comment:


  • nhirene
    started a topic if else
    in PHP

    if else

    Code:
    if ($username&&$password)
    
    //$connect = mysql_connect("localhost", "root", "") or die("Couldn't connect!");
    //mysql_select_db("login") or die("Could't find db");	
    	
    	$query = mysql_query("SELECT * FROM users WHERE username=='$admin' && password=='$12345'" );
        $db_rows= '';
        if ($numrows!=0)
    ...
    See more | Go to post

  • Undefined variable: numrows in C:\xampp\htdocs\csrc\Untitled-1.php on line 16

    Code:
    $query = mysql_query("SELECT * FROM users WHERE username='$username'");
    	$db_rows= '';
    	if ($numrows!=0)
    	{
    		while ($row = mysql_fetch_assoc($query))
    		{
    			$dbusername = $row['username'];
    			$dbpassword = $row['password'];
    		}
    		//check to see if match!;
    		if ($username==$dbusername&&$password==$dbpassword)
    		{
    			//echo "You're IN!";
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 15 '14, 04:57 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
No activity results to display
Show More
Working...