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 :)
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.
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!
Hi if anyone is getting the error: "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\belepes2\register.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!"); }
@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.
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. =(
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!!!
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 !!!
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.
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
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..
@1337Boredness To remove the username case-sensitivity go to your "login.php" and go down to "if ($username==$dbusername&&md5($password)==$dbpassword)". Then you have to add "strtolower" right before "$username" then enclose in parenthesis. For example: "if (strtolower($username)==$dbusername&&md5($password)==$dbpassword)". That should do it! Sorry, but that's the best way I can explain it in words.
@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.
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.
" Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in C:\xampp\htdocs\userlogin\register.php on line 3 "
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.
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.
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.
IT WORKS!!!! thank you you're awesome
fruitman89 1 week ago
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!"); }
loyaus 1 week ago
try this:
mysql_query("SELECT username FROM users WHERE username='$username' ");
armansrsa 1 week ago
Need help with all the tutorial please...
guini0212 2 weeks ago
Warning: mysql_num_rows() expects parameter 1 to be resource, string given in C:\xampp\htdocs\tutorials\register.php on line 79
this is script:
$connect = mysql_connect('localhost','root','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" ;
TM8Eyla 2 weeks ago
awsome videos..helped me a lot..just wondering is there any logout page with session..i saw session already.thanks
deadhasan 1 month ago
Thank you very very very very much. You should be awarded for your tutorials.
Rawaz1995 2 months ago in playlist More videos from phpacademy
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 3 months ago
@gentlxman me to pleaz help
TM8Eyla 2 weeks ago
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
VigilianceAurelious 5 months ago
HELP ME!!!
Notice: Undefined variable: username in D:\xampp\htdocs\site\register.php on line 10
that shit is showing!
MegaLuka99 6 months ago
Notice: Undefined variable: username in D:\xampp\htdocs\site\register.php on line 10
MegaLuka99 6 months ago
How do you put this whole thing on a website because you can't use a localhost can you?
GodxGaming 6 months ago
This has been flagged as spam show
Thanks alex, My personal thanks in a video for phpacademy!
watch?v=DTSooY8fqpw
SilverMagics 6 months ago
you are the man, downloadyo|com
NarutoAOF 6 months ago in playlist Register & Login
I LOVE YOU ALEX! <3
abalbertab 7 months ago
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 :)
MenteFracturada 8 months ago
So clearly described - Really helpful! Thanks, alex! :)
Vortex42 8 months ago
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.
ljk1181 9 months ago
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
8998934 9 months ago
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 10 months ago 4
@XxDJcommanderxX Thanks it worked!
Can you tell me what's the use of mysql_fetch_array? :o
VigilianceAurelious 5 months ago
@VigilianceAurelious it fetches an array of the rows from the mysql query
madmatthew1 5 months ago
@XxDJcommanderxX thanx man now it works
TM8Eyla 2 weeks ago
you're sick working with php thanks man
XxDJcommanderxX 10 months ago
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!
Jimd5353 10 months ago
Very well explained and easy tutorials. Good testing.
ninjafoxinteractive 10 months ago
Hi if anyone is getting the error: "Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\belepes2\register.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!"); }
michaelwhitecollar 10 months ago
Hey, excellent tutorial. It's been really useful. Thanks!!!
germanUTP 10 months ago
this registration form allows people to have a usernames that includes symbols like &^*+-£
Hattlen 11 months ago
6 parts?! come on man!
D:
Cantinflat 11 months ago
Comment removed
MultiNickKick 11 months ago
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
shootdatbol08 11 months ago
a username with a space next to it is not the same as one without
thumbs up so that alex can see this problem
Hattlen 11 months ago 4
This has been flagged as spam show
Heck out the thousands of profiles for Naughty women mworld5.info
TONIACLARA 1 year ago
thankyou!!
sidney252 1 year ago
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
nina1bloch 1 year ago
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\register.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 1 year ago 2
@unitron2005 insert mysql_select_db() on top of $namecheck. hope this helps.
vincenttky 1 year ago
@vincenttky I managed to get it working since then, but thank you really much for your help. :o)
unitron2005 1 year ago
@unitron2005 same errors just like mine..
can you teach me how to meke mine wotk???
really need your help
LDsm2424 11 months ago
@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!
unitron2005 11 months ago
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.
Colteee 1 year ago
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
Colteee 1 year ago
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!
sapienzx 1 year ago
Thanks a lot brother. Great job with the tutorials. God Bless
fastball90 1 year ago
2:32 that's what she said
PineHack 1 year ago
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. =(
AshleyMcGowan1 1 year ago
you are fantastic!!!! your video tutorials are very helpful to everyone... Thank you so much!!! God Bless you!!!!!!
HincorXXX 1 year ago
You used strtolower in the creation page, that should also be done in the Login page right???
GREAT TUTS, WORKS FOR ME!!!
omega7arts 1 year ago
very neat and helpful tutorial! Thanks a lot.
sofaahil 1 year ago
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!!!
boneysin 1 year ago
Thanks Much!
Rickyyis 1 year ago
nice... good job.. keep it up
kcid02 1 year ago
Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in C:\xampp\htdocs\Hemsida\register.php on line 19
what is the problem i have type exactly as you
msborat96 1 year ago
@msborat96 I have solved the problem i have just forget a H in WHERE
msborat96 1 year ago
Great and easy tutorial. Also me, as a German, understood everything! Thank you very much for that!
blunnym 1 year ago
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 !!!
eddyterminator 1 year ago
really good tutorials, I appreciate the effort! Keep up the good work!
beef267 1 year ago 17
@beef267 Thank you! Really nice to hear.
phpacademy 1 year ago 8
@phpacademy ALEX U ARE DE BEST EVER THANKS VRM MAN!
KuenteWay 11 months ago
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 1 year ago
@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.
phpacademy 1 year ago
thanks for the tutorial :D
could you make a tutorial that creates a url for each registered user?
Muse94Muse 1 year ago
Just great..thanks
tunkara 1 year ago
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
RK143king 1 year ago
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 1 year ago
@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
lukie254 1 year ago
hi
i wana ask how i can show name in place of username fetching it from database....???
alraza1 1 year ago
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..
sasforce1994 1 year ago
Comment removed
sasforce1994 1 year ago
Hi, when i register with 'daniel'... i can't login with 'DaniEl'... can i remove the case sensitivity for the username?
1337Boredness 1 year ago
Comment removed
royalmilli 1 year ago
This has been flagged as spam show
@1337Boredness To remove the username case-sensitivity go to your "login.php" and go down to "if ($username==$dbusername&&md5($password)==$dbpassword)". Then you have to add "strtolower" right before "$username" then enclose in parenthesis. For example: "if (strtolower($username)==$dbusername&&md5($password)==$dbpassword)". That should do it! Sorry, but that's the best way I can explain it in words.
ChekMaFresh 1 year ago
thx man, with your help with php , i passed a one discipline in my university. thx a lot
luisxexas 1 year ago
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
locarish 1 year ago
Comment removed
Riku3c 1 year ago
please code download zip,rar
MrSzymexx 1 year ago
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.
Canadianswithbrains 1 year ago
you should do the same with the full name to check if they are making more than 1 account ;)
harryrockin 1 year ago
@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.
Spidason 1 year ago
i want the same but only for registering email adressen for my newsletter
basmagic 1 year ago
you're bum-bum-bum!!!! thanks!!!!!!!
bearmaxd 1 year ago
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?
Aut0Farmer 1 year ago
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.
oozecandy 1 year ago
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
Zeld0 2 years ago
Thank you so much Alex
You have really motivated me in learning php into details...lol.
I really appreciate it... keep on
cullzilla 2 years ago
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\register.php on line 3 "
anup756 2 years ago
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
blbennett8 2 years ago
Thank you alex you save my life of failing my php class hahahaha thank you!!
Yunalaska1234 2 years ago
Thanks so much for these tutorials! I hit a couple of hurdles but I've got it working!
pakalika 2 years ago
Where is username already teaken??????
89Miami 2 years ago
100% thank you for the Tutorial.
RedOjin 2 years ago
Thank u so much alex..i really need that stuff...see ya in the next part..lol
koustavbhowmik 2 years ago
Fantastic tutorial Alex.
Question can you show us how to do a username/password recovery please?
utdfederation 2 years ago
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 2 years ago
@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.
fugazi0311 1 year ago
This was awesome! Thanks so much!
SpinCentral 2 years ago
Hello Alex, thank you so much. I also have learn so much from your tutorials, all you effort is worthwhile and so very awesome.
BruceSwissBoy 2 years ago 2
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?
TheGilsan 2 years ago
probably the best question i ever saw ! =)
aspirinemaga 2 years ago
@TheGilsan Doesn't matter if the password is already taken. Users are identified uniquely by their username, not their password.
fugazi0311 1 year ago
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 ..
matrix001m 2 years ago
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.
shah262 2 years ago
I'm learning a lot from your videos men, thanks :)
italoven 2 years ago
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.
vaispatu2006 2 years ago
sweet thanks it helped for my script :) keep it up =D
Timzy921 2 years ago
When checking in php (strings) does it matter for instance if someone had Alex and also alex... do capitals matter when checking strings?
chjustin69 2 years ago
HAHA sorry you answered this while I was watching!
chjustin69 2 years ago