Jan
9
2018

PHP MySQL Tutorial

Get the Code Here : http://goo.gl/Aocylf

PHP Tutorial : https://www.youtube.com/watch?v=7TF00hJI78Y

MySQL Tutorial : https://www.youtube.com/watch?v=yPu6qV5byu4

Support Me on Patreon : https://www.patreon.com/derekbanas

Previously I covered the vast majority of both PHP and MySQL in 2 videos. This time I decided to bridge the gap and show how to simply grab data from and edit data in a MySQL database using PHP.

We specifically cover creating users with limited access for security reasons, setting up secure database connections, pulling data from a database, adding data to the database and prepared statements.
Video Rating: / 5

11 Comments+ Add Comment

  • Everything I know is built off of this and supplemented only by the manuals and stack exchange. It's insane how much I've accomplished off this amount of information…

  • i m unable to execute this the getstudentinfo.php shows the following
    Warning: require_once(../mysqli_connect.php): failed to open stream: No such file or directory in C:xampphtdocsgetstudentinfo.php on line 3

    Fatal error: require_once(): Failed opening required '../mysqli_connect.php' (include_path='C:xamppphpPEAR') in C:xampphtdocsgetstudentinfo.php on line 3

  • sorry to ask, im new here. I've got notification that cant connect to server. Can I replace localhost to any name I wanted? If so, what should I do before? creating the page (?)

  • Hi Derek, I'm such a disaster at this… I'm trying something simple here, however different from what you got here… But, in my ignorant perspective, it should work.
    I just get loads of error messages:
    Warning: mysqli_prepare() expects parameter 1 to be mysqli, resource given in /home/www/montedachamine.com/new/php/adminAdded.php on line 32

    Warning: mysqli_stmt_bind_param() expects parameter 1 to be mysqli_stmt, null given in /home/www/montedachamine.com/new/php/adminAdded.php on line 33

    Warning: mysqli_stmt_execute() expects parameter 1 to be mysqli_stmt, null given in /home/www/montedachamine.com/new/php/adminAdded.php on line 34

    Warning: mysqli_stmt_affected_rows() expects parameter 1 to be mysqli_stmt, null given in /home/www/montedachamine.com/new/php/adminAdded.php on line 35
    Error Ocurred

    Warning: mysqli_error() expects exactly 1 parameter, 0 given in /home/www/montedachamine.com/new/php/adminAdded.php on line 43

    Warning: mysqli_stmt_close() expects parameter 1 to be mysqli_stmt, null given in /home/www/montedachamine.com/new/php/adminAdded.php on line 44

    Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/www/montedachamine.com/new/php/adminAdded.php on line 45

    and:

    Couldn't issue db query
    Warning: mysqli_error() expects parameter 1 to be mysqli, resource given in /home/www/montedachamine.com/new/php/getAdmin.php on line 27

    Warning: mysqli_close() expects parameter 1 to be mysqli, resource given in /home/www/montedachamine.com/new/php/getAdmin.php on line 31

  • What if I'm not getting any errors/messages when it goes to studentadded.php, and nothing shows up in mysql?

  • thank u bro <3 =)

  • if you would speak faster than this you would be eminem. jokes aside thank you so much for these videos .

  • Wonderful tutorials. Its amazing. Nice explanation. Thanks.

  • is this from worldwide?

  • than you helps me alot

  • Please, correct me if I am wrong.
    Just to clarify something I hadn't understand. There are 3 ways to connect
    * MySQLi (object-oriented) -Ex. $conn = new mysqli($servername, $username, $password);
    * MySQLi (procedural) – Ex. $conn = mysqli_connect($servername, $username, $password);
    * PDO – Ex. $conn = new PDO("mysql:host=$servername;dbname=myDB", $username, $password);

    Derek used the MySQLi (procedural) and added @ to suppresses error messages.
    $conn = @mysqli_connect($servername, $username, $password);

Leave a comment