Added: 2 years ago
From: phpacademy
Views: 40,357
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (111)

Sign In or Sign Up now to post a comment!
  • IT WORKS!!!! thank you you're awesome

  • I have problem with this code

    Can anyone help me to solve this?

    Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given

    $namecheck = mysql_query("SELECT username FROM users WHERE username='$username'"); $count = mysql_num_rows($namecheck); if($count!=0) { die ("Username already taken!"); }

  • try this:

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

  • Need help with all the tutorial please...

  • Warning: mysql_num_rows() expects parameter 1 to be resource, string given in C:\xampp\htdocs\tutorials\regi­ster.php on line 79

    this is script:

    $connect = mysql_connect('localhost','roo­t','XXXXXXXXXX') or die("couldn't connect") ;

    mysql_select_db("website") ;

    $namecheck = mysql_query("select username FROM users WHERE username='$username'") ; if($namecheck) { $count = mysql_num_rows("$namecheck") ; echo"$count" ;

  • awsome videos..helped me a lot..just wondering is there any logout page with session..i saw session already.thanks

  • Thank you very very very very much. You should be awarded for your tutorials.

  • 5:27 I got this :Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\register.php on line 18

    Can someone helps me please!

  • @gentlxman me to  pleaz help

  • Thanks a lot Alex!

    I Appreciated all of your videos!

    I took me a lot of days to finish this register and login tutorials due to I'm encountering a lot of errors

    WHICH

    I also helped me to look for my errors and what's wrong with it.

    Thanks a lot!

    You will be the reason why I will be able to find a side line job of php programming soon! since I'm still on college and studying XD

  • HELP ME!!!

    Notice: Undefined variable: username in D:\xampp\htdocs\site\register.­php on line 10

    that shit is showing!

  • Notice: Undefined variable: username in D:\xampp\htdocs\site\register.­php on line 10

  • How do you put this whole thing on a website because you can't use a localhost can you?

  • you are the man, downloadyo|com

  • I LOVE YOU ALEX! <3

  • Spanish

    Alguien me podria enviar el codigo .. php , del archivo register.php ? de este video esque no lo alcanzo a apreciar . :) de ante mano gracias y se lo agradeceria al que se tome la molestia de acerlo :)

  • So clearly described - Really helpful! Thanks, alex! :)

  • I appreciate your tutorials but they are hard to follow because you don't show the whole code. This causes people to get lost when coding. It would help if you scroll through the whole code at the end of your videos.

  • if any1 is wondering how they go about resetting the auto increment back to zero, the code is:

    ALTER TABLE 'table_name' WHERE AUTO_INCREMENT="0"

    you run it as a query by using phpmyadmin.

    i had to do this for my "ID" field

  • having trouble??

    code by me is less complicated!

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

    while($row = mysql_fetch_array($namecheck))

    {

    die("User already taken");

    }

  • @XxDJcommanderxX Thanks it worked!

    Can you tell me what's the use of mysql_fetch_array? :o

  • @VigilianceAurelious it fetches an array of the rows from the mysql query

  • @XxDJcommanderxX thanx man now it works

  • you're sick working with php thanks man

  • These tutorials are really helpful. Not only do you know what your talking about but you speak clearly and don't mumble like some of those other nerds. I can't even hear what theyre trying to say its so annoying!

  • Very well explained and easy tutorials. Good testing.

  • Hi if anyone is getting the error: "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\belepes2\regis­­ter.php on line 21"

    Try this code instead of his: $namecheck = mysql_query("SELECT username FROM users WHERE username='$username'"); $count = mysql_fetch_assoc($namecheck); if ($count['username'] == $_POST['username']) { die ("Username is already taken!"); }

  • Hey, excellent tutorial. It's been really useful. Thanks!!!

  • this registration form allows people to have a usernames that includes symbols like &^*+-£

  • 6 parts?! come on man!

    D:

  • Comment removed

  • i logged in just to say Thank You.. :D

    help me alot.. just wonderin if you can make a Uploading and Downloading files on PHP.. :D

    well THANK YOU very much.. :D

  • a username with a space next to it is not the same as one without

    thumbs up so that alex can see this problem

  • thankyou!!

  • so you taught me PHP (most if it, i already knew c++ so it was just learning how php use's values n such) in 1 night, THX:D

  • after finishing the code, I get this error:

    "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\belepes2\regis­ter.php on line 21"

    PLEASE somebody can tell me what this means? I'm pretty sure that I made the same code phpacademy did, yet I always get this error.

    Thank you

  • @unitron2005 insert mysql_select_db() on top of $namecheck. hope this helps.

  • @vincenttky I managed to get it working since then, but thank you really much for your help. :o)

  • @unitron2005 same errors just like mine..

    can you teach me how to meke mine wotk???

    really need your help

  • @LDsm2424 Sorry, but I don't really remember what the problem was anymore, but I do remember, that it was some minor little thing, so make sure you check your code very carefully because even the smallest things can cause problems.

    Good Luck!

  • i forgot: when I press "Register" on my page, i put the code from "Register.php"

    (the code inside Form)

    and then the page goes to /register.php and it shows all my code.

  • Now, I have my login.

    How do I paste it on my website and make it work?

    I tried to paste the code to my site, it bugged.

    And btw, my friends can't use the links, right? since it's my localhost :S

    And do I have to portforward anything?

    And 1 more thing, if i want to keep my register-login form online all the time, my PC has to be running all the time or will my website crash?? :S

  • Alex god bless you! Your tutorials actually inspired me to move on with my college project and to complete it soon!

    You & your tutorials are just so AWESOME!

    Thanks a million man!

  • Thanks a lot brother. Great job with the tutorials. God Bless

  • 2:32 that's what she said

  • yay it works 1 last thing what would be the best method of embeding it onto a website sould i copy the html around it onto each page or use an iframe on my home page or is there a better way. i can see problems with both them methods. =(

  • you are fantastic!!!! your video tutorials are very helpful to everyone... Thank you so much!!! God Bless you!!!!!!

  • You used strtolower in the creation page, that should also be done in the Login page right???

    GREAT TUTS, WORKS FOR ME!!!

  • very neat and helpful tutorial! Thanks a lot.

  • God bless you Alex!

    Thanks a lot for these tuts and the lucid explanation. I like it when u include the real world scenarios. I posted a query in ur forums and people are really friendly and helpful there!

    Wishing you and your family a Happy Diwali! cheers!!!

  • Thanks Much!

  • nice... good job.. keep it up

  • Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Hemsida\regist­er.php on line 19

    what is the problem i have type exactly as you

  • @msborat96 I have solved the problem i have just forget a H in WHERE

  • Great and easy tutorial. Also me, as a German, understood everything! Thank you very much for that!

  • Hi! Best tutorials! I have just one question: How can I add more fields that has to be completed by the suer when he signs up? Like email, country... and how can I see these infomrations in my database? THANKS !!!

  • really good tutorials, I appreciate the effort! Keep up the good work!

  • @beef267 Thank you! Really nice to hear.

  • @phpacademy ALEX U ARE DE BEST EVER THANKS VRM MAN!

  • Hi! thanks for your tutorial. It's realy helping me a lot. You said in your videos that if we have any questions we can ask for help.... so... there is something realy weird that I can't figure it out, nor fix it. I have tried your example from your tutorial and everything worked fine until the sessions. When I try to enter the members page... it keeps saying "You're not logged in" Why is saying that?!... Can u help me?! Thanks in advance... see ya

  • @mariusmihaila35 These are older tutorials and therefore I used to have a LOT more time. If you need any help you're welcome to use the phpacademy forum. Link on my channel homepage.

  • thanks for the tutorial :D

    could you make a tutorial that creates a url for each registered user?

  • Just great..thanks

  • Hi! alex your uploaded tutorials is very great and every like this but we all have a problems same to all submit error so please help us thank full to you for all guyes 

  • HELLO SIR, I LIKE ALL YOUR VIDEOS BUT I WANT TO ASK ONE THING THAT I CHECK ALL THE VIDEOS BUT YOU HAVEN'T UPLOAD " DOWNLOAD FILE SCRIPT" USING PHP.... IF YOU CAN PLEASE DO ONE MORE THING IT IS VERY BENEFITIAL FOR ALL....

  • @akvermamca if he does that people just download the file and don't watch the video, and he explains it a lot. So if they don't watch they don't learn :P

  • hi

    i wana ask how i can show name in place of username fetching it from database....???

  • Thanks you, for the Best PHP tutorial's you make of all people, you tell about everything wat it do and what it can do. I only gain something like a error by the register page. Maybe you can help me..

  • Comment removed

  • Hi, when i register with 'daniel'... i can't login with 'DaniEl'... can i remove the case sensitivity for the username?

  • Comment removed

  • thx man, with your help with php , i passed a one discipline in my university. thx a lot

  • Dude your tutorials are simply brilliant.

    Love your narrating and examples, they are REALLY helpfull.

    Totally CPR for my lust for programming :-D

    Anyways a have one question.

    Do you think it is possible that you can make a tutorial on how to deal with foreing keys in an (easy) short real-life usable situation example???

    Much appreciated :-D

  • Comment removed

  • please code download zip,rar

  • Could you do like.... a twitter user page ( Dynamic ) from what the user typed like ...

    site/username

    it would show the users page... and everything eneterd by the user.

  • you should do the same with the full name to check if they are making more than 1 account ;)

  • @harryrockin but what if the user that is trying to register has the same full name as the one in the database HUH? for e.g. "John Smith" is trying to register but can't register because there is another user with the fullname of "John Smith" registered within the system already. So the username should do it since its the only record that actually shows in member pages.

  • i want the same but only for registering email adressen for my newsletter

  • you're bum-bum-bum!!!! thanks!!!!!!!

  • Alex,

    Awesome tutorials, thanks!!

    To connect to the DB for user registration, I see that you're including the DB login information in the PHP cod. I'm a php noobie, so I may be missing something, but if someone were to view the source of the php code, wouldn't the db name, user, and password be comprimised?

  • That's the nice thing about php- in contrast to javascript, etc., it is executed server-side, i.e. you can't just view the php source code in your browser- only what is echoed out.

  • Hmm.. I have a problem!

    Wen I login and write big caracters on the username, and I know i write the right password.

    And then the login page says: "Wrong Password!"

    :S

  • Thank you so much Alex

    You have really motivated me in learning php into details...lol.

    I really appreciate it... keep on

  • why is it giving this error??

    " Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\userlogin\regi­ster.php on line 3 "

  • Anyone know why I'm getting the following error when I try to check for repeat usernames? Thanks in advance!

    Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource

  • Thank you alex you save my life of failing my php class hahahaha thank you!!

  • Thanks so much for these tutorials! I hit a couple of hurdles but I've got it working!

  • Where is username already teaken??????

  • 100% thank you for the Tutorial.

  • Thank u so much alex..i really need that stuff...see ya in the next part..lol

  • Fantastic tutorial Alex.

    Question can you show us how to do a username/password recovery please?

  • i know i'm asking a lot here buddy but also would you be able to show us how to do a script for the user to agree with terms and conditions before they can proceed?

  • @utdfederation What most sites I see do is when the user registers they supply their email address. If they've forgotten their password they click a link to reset their password and enter their username and/or email. The password is reset to something random and is emailed to the user's email address. Then the user can log in with the new password and reset the password to something new.

  • This was awesome! Thanks so much!

  • Hello Alex, thank you so much. I also have learn so much from your tutorials, all you effort is worthwhile and so very awesome.

  • Hello Alex!!!! Thank you so much for you PHP tutorial. I lerned a lot about it..

    i have a question.

    What if, the password is already taken?

  • probably the best question i ever saw ! =)

  • @TheGilsan Doesn't matter if the password is already taken. Users are identified uniquely by their username, not their password.

  • Hiii Alex , i would like to say one thing to u

    thankssssss..

    before some days i have some problem in my login and register script .. but your script help me to out of this problem ..

  • Hi Alex good tutorial. but if you use a check availability button or link next to the user text box to check if it's exist in the data base and show the error on the same page. so will not need to type in all the four fields.

    Anyway the logic is simple and clear.

  • I'm learning a lot from your videos men, thanks :)

  • Special Thanks to you all the way from the Island of Samoa. I really enjoy watching all of your tutorials. I do C and C++....but this time, I am going to learn PHP to the max. Thank you once again.

  • sweet thanks it helped for my script :) keep it up =D

  • When checking in php (strings) does it matter for instance if someone had Alex and also alex... do capitals matter when checking strings?

  • HAHA sorry you answered this while I was watching!

Loading...
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