RE: PHP and MySQL 07-30-2014, 08:34 AM
#2
Why do you use the old mysql_connect(), its vulnerable and also the PHP community discourages using this, its there just for legacy support. Use Mysqli instead as that is better. I suppose you know this already but still making it with mysqli would have been better.
using include() is not good instead using include_once is much better imo.
This more or less CRUD application you made is often a very common example, and a simple Google search will fetch even better results with more explanation tutorials than the one you posted here. So whats the use of such a tutorial ?
Also I don't think calling this thread even a tutorial would be correct since all you did was posting the code and hence using a source code prefix would have been much better.
It is often a good practice to create a config.inc.php file or something and then define the parameters using define() and then use require_once(), example :-
define("DB_HOST", "localhost");
define("DB_USER", "root");
define("DB_PASS", "********");
etc. etc.
Conclusion:-
You worked to make it better but still made the tutorial lack in several ways.
If you think that we should teach the users from basic then believe me, people who will join this site most of them don't read tutorials like this if they are not detailed or some new techniques or tricks are covered. They will always choose something which is much more informative so that their time is not wasted. But if you can cover things that requires more Googling then a user will surely read your thread as they can get more information in one thread.
If you decide to make them in smaller parts then thats useless too since if something can be compiled together as one and if they are linked then it should remain linked.
If it was meant for other better and regular users then probably they would do the same as above and also probably a lot of good members here already knew these simple things.
So, to sum up I would say that the thread should have been much more detailed and should have covered tricks or traps.
Thank you,
Sincerely,
Psycho_Coder.
using include() is not good instead using include_once is much better imo.
This more or less CRUD application you made is often a very common example, and a simple Google search will fetch even better results with more explanation tutorials than the one you posted here. So whats the use of such a tutorial ?
Also I don't think calling this thread even a tutorial would be correct since all you did was posting the code and hence using a source code prefix would have been much better.
It is often a good practice to create a config.inc.php file or something and then define the parameters using define() and then use require_once(), example :-
define("DB_HOST", "localhost");
define("DB_USER", "root");
define("DB_PASS", "********");
etc. etc.
Conclusion:-
You worked to make it better but still made the tutorial lack in several ways.
If you think that we should teach the users from basic then believe me, people who will join this site most of them don't read tutorials like this if they are not detailed or some new techniques or tricks are covered. They will always choose something which is much more informative so that their time is not wasted. But if you can cover things that requires more Googling then a user will surely read your thread as they can get more information in one thread.
If you decide to make them in smaller parts then thats useless too since if something can be compiled together as one and if they are linked then it should remain linked.
If it was meant for other better and regular users then probably they would do the same as above and also probably a lot of good members here already knew these simple things.
So, to sum up I would say that the thread should have been much more detailed and should have covered tricks or traps.
Thank you,
Sincerely,
Psycho_Coder.
![[Image: OilyCostlyEwe.gif]](http://fat.gfycat.com/OilyCostlyEwe.gif)
![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)