PLEASE CHECK OUT THE SECOND VIDEO OF THIS A quick and easy user registration using php, sql and phpmyadmin. For full size and source codes: www.neoblob.com SQL: CREATE TABLE `user` ( `id` int(10) unsigned NOT NULL auto_increment, `username` varchar(20) NOT NULL default '', `password` varchar(50) NOT NULL default '', `email` varchar(40) NOT NULL default '', `ip` varchar(20) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;...
What a difficult way to connect to database.. just put the information directly instead of making variabels at first :O You don’t have to write it again at the same page, anyway..
you dont have to say them twice.. and you dont need to set variables unless you are goning to run a “clean and make safe” on variables… you can directly use them on query… but this wont be secure.. so keep setting variables but make them safe….
I mean.. this tutorial is OK for some beginners but why not jus put the host,dbuser,dbpass,and db variables in a config file and at the top jus put include “config.php”; its a much easier way than having to put all that info on a page
hello I’ve been watching your videos in php since last year.. I just wanna know what is the use of this symbol -> cause I saw my classmate use this for some sort..
i.e $poll->vote($_SESSION['userid'],$_GET['id'],$_POST['option']);
}
-> is used to access an entity of an object. In this case the object is $poll and by doing $poll->vote, a function called vote within the poll class will be invoked.
it might have been more useful to take the users through creating the tables via the phpmyadmin user interface instead of just copy pasting a load of SQL which most users probably wont understand.
U know what they say, give a man a fish and he will eat for a day, teach him to fish and he will eat for a lifetime
October 7th, 2009 - 14:25
What a difficult way to connect to database.. just put the information directly instead of making variabels at first :O You don’t have to write it again at the same page, anyway..
October 8th, 2009 - 16:13
“or or” “equals equals” lol..
you dont have to say them twice.. and you dont need to set variables unless you are goning to run a “clean and make safe” on variables… you can directly use them on query… but this wont be secure.. so keep setting variables but make them safe….
October 11th, 2009 - 22:42
Bloddy Hell. YOUR VOICE IS A BITCH LIKE MY EX!!! IT IS AN ANNOYING SQUEAKING VOICE THAT NEVER SHUTS THE HELL UP!
October 14th, 2009 - 15:35
I mean.. this tutorial is OK for some beginners but why not jus put the host,dbuser,dbpass,and db variables in a config file and at the top jus put include “config.php”; its a much easier way than having to put all that info on a page
October 14th, 2009 - 15:37
oh and good on the commenting that is great for beginners
October 15th, 2009 - 16:50
“mysquaaal” omg i nearly dies how annoying voice
October 17th, 2009 - 06:11
just be glad he showed oyu how besides a minor defect.. mys-q-l is how its pronounced but it looks like mysqaaal
October 17th, 2009 - 06:11
omg soo many typos in mine.. sooo many erros!!! ahhh CRAZY finnaly fixed thme..
November 3rd, 2009 - 17:59
“hang on, I get IMed alot….”
November 15th, 2009 - 08:03
And “i nearly dies” with how much you fail at English.
November 15th, 2009 - 13:12
some addvice you have the register page connecting to the db twice you only have to connect 1ce on each page
November 15th, 2009 - 15:11
I would say its a fail at typing, not English
November 16th, 2009 - 07:51
I would like to point out something that someone has already pointed out: you only have to connect once per script.
Also, I would recommend you didn’t use bad coding practices like the above…
November 27th, 2009 - 02:32
hello I’ve been watching your videos in php since last year.. I just wanna know what is the use of this symbol -> cause I saw my classmate use this for some sort..
i.e $poll->vote($_SESSION['userid'],$_GET['id'],$_POST['option']);
}
November 29th, 2009 - 01:08
If he fails at English who really cares? we are not his English teacher anyway you IDIOT
December 3rd, 2009 - 14:35
Warning: show_source() has been disabled for security reasons in /home2/neoblob/public_html/phpsquad/tuts/php/1/index.php on line 87
December 4th, 2009 - 23:37
willzurmacht –
-> is used to access an entity of an object. In this case the object is $poll and by doing $poll->vote, a function called vote within the poll class will be invoked.
December 6th, 2009 - 06:46
it is used when you have a class reference.
in this example you are using a “function” from you object poll ($poll)
Regards
December 6th, 2009 - 07:02
thank you Mr.MarcosRosa
December 6th, 2009 - 07:02
Thank you coopaloop86!!
December 6th, 2009 - 07:09
any time buddy!
December 14th, 2009 - 20:54
Thanks so much. You finally solved my problem!
December 17th, 2009 - 20:02
Audio quality is horrible.
January 2nd, 2010 - 07:16
on 15.28 – how this “GO BACK” link work ?
January 9th, 2010 - 18:21
it might have been more useful to take the users through creating the tables via the phpmyadmin user interface instead of just copy pasting a load of SQL which most users probably wont understand.
U know what they say, give a man a fish and he will eat for a day, teach him to fish and he will eat for a lifetime