Added: 11 months ago
From: abell12
Views: 5,018
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (32)

Sign In or Sign Up now to post a comment!
  • hye ;)

    when i click log in..this appear

    Click here to enter the members area"; $_SESSION['username']=$dbusern­ame; } else echo "Incorrect password"; } else echo ("That username doesnt exist"); } else die ("Please enter a username and password"); ?>

    can u help me???

    thanks

  • namae

  • this can be attacked with sql injection. by that i mean, i could add a user by writing some magic into the username field.

    also you dun need select *

    you could just do select `users`.`password` because you know the username already and dont need the id in your case anyways.

    php.net/manual/en/function.mys­ql-real-escape-string.php

  • should it no be

    mysql_connect("localhost", "username", "password") or die(mysql_error()); mysql_select_db("Database_Name­") or die(mysql_error()); and also

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

    

  • Once I put in the username and password and hit login, it just brings up a blank page leading to login.php witch doesn't have anything on it. Please help, thanks!

  • @BudgieBlu on login.php in do you have any echo's or a header in this if statement:

    if($username==$db_username&&$e­nc_password==$db_password)

  • @abell12 yes i have the echo for the successful login and incorrect password

  • @BudgieBlu Can you send me your code in a private message?

  • It is so great

  • YOU. ARE. BEAST......Done. best ever tutorial in the big huge world, thanks again man!

  • Hello i notice that the register page encripts the password but the login form dose not login with out it bening encripted help me

  • @EwizedTech It's because when i created the register form i encypted the password and the encryted password was stored in the database but the login for when i did the tutorial i didnt use an encypted password so you just need to add in on the login for the MD5 encrytion function to encypt the users password before checking the current password in the database

  • What are the steps to do this?

  • @abell12 I have hosting and 'MySQL' is all on the cPanel, will my number still be "127.0.0.1"?

    thanks

  • @davervd86 Sometimes, but most servers provide you with a specific host to connect to. It should have told you this when you created your database

  • Comment removed

  • Comment removed

  • where can I download the code from this series?

  • @stephensans Go to the link in the description. Register (Its free) and you will now be able to download

  • how do u fine'd out the local host number

  • @GFXshadows Everybody's number is the same 127.0.0.1

  • @abell12 cheers

  • @GFXshadows what about the username and password because it is still saying that line is wrong

  • @abell12 what about the username and password because it is still saying that line of code is wrong

  • @GFXshadows Send me the code in a private message

  • hey i've got a question.. as i type $username and other codes starting with $.. it doesn't turn blue. it's just plane black. and when i try to login the whole php code comes up in the browser.. help please

  • @paoloapol02 Are you using dreamweaver to code if not what are you using. 2nd check if the server actually has php installed.

  • @abell12 yes i'm using dreamweaver.. how do i check if the server has php installed?

  • @abell12 and I'm also using wamp as my server

    

  • @paoloapol02 Wamp server comes with PHP instaled but just to check click on the green wamp icon in your toolbar and goto php and current version and make sure that a version is ticked. If it is then it might be that something is wrong with the php.ini file or something sorry but i cant help you with that try google it. As for the dreamweaver problem try google that but you might find that re-installing dreamweaver and wamp maybe that your problem may be fixed

  • oh yeah 1st comment, great tutorial b the way, just a quick enquiry would you be able to make a tutorial in the future that teaches you how to create a register form

  • @blendercomedy Yeh sure i can do that. Subscribe to make sure you know when i upload it.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more