PHP CRUD Tutorial with MySQL & Bootstrap 4 (Create, Read, Update, Delete)




In this PHP CRUD Tutorial we’re going to create a fully functional PHP CRUD application with Bootstrap and MySQL. PHP CRUD stands for Create, Read, …

Original source


32 responses to “PHP CRUD Tutorial with MySQL & Bootstrap 4 (Create, Read, Update, Delete)”

  1. hi this is probably the most helpful tutorial I've watched thus far so thank you so much! However i am trying to accomplish this task using bootstrap modals? how would i implement this? I am a beginner to coding and have been struggling with this all week… would really really appreciate it if you could provide guidance on this! Thanks

  2. This is by far the most successful tutorial I've watched on PHP, MYSQL. I'd love to see a video on search function in the database, and pagination. Also, it would be good if you could depend on CSS3 instead of Bootstrap. I really appreciate the work. Thanks.

  3. I followed this tutorial, but I can't get the Update part to work, when I click the Update button, it routes to my "process.php" page, to a blank screen. I don't really understand why. My code for this has been copied completely, please help?

  4. Warning: count(): Parameter must be an array or an object that implements Countable

    I keep on getting error like this when i try to display data from the table with the button edit, any fix for this? Thank you so much for a great tutorial.

  5. This is a very good tutorial! Thank you Clever Techie!

    If you ever encounter that your Delete Message Alert is not display…

    Put a die() function right after the header('location: index.php');

    It will look like this:
    if (isset($_GET['delete'])){

    $id = $_GET['delete'];

    $mysqli->query("DELETE FROM data WHERE id = $id") or die( $mysqli->error());

    $_SESSION['message'] = "Record has been deleted!";

    $_SESSION['msg_type'] = "danger";

    header('location: index.php');

    die();

    }

  6. Great tutorial, thank you for all your super-helpful videos! I am following along step-by-step and have encountered an issue at the ‘Edit’ user section.

    You put your ‘SELECT * FROM data WHERE id = $_GET[‘edit’]’ query and variable-setting logic in the process.php file as if it was supposed to be called when the Edit button is clicked. But, the Edit button’s href target is itself, the index.php page. How is the code in process.php to retrieve the selected user’s record being invoked and how are the updated $name and $location variables getting passed back to index.php?

    I had to put the query and variable-setting logic in the index.php file above the add/edit form <div> to get it to work.

    I thought I was getting this really well but am really confused now – I don’t understand how your code works since:
    1) you aren’t calling the process.php file when you click an ‘Edit’ button,
    2) nor are you passing any SESSION or GET variables back to index.php from the Edit code in process.php even if you got there somehow.

    I’m sure I’m missing something obvious but I am stumped right now.

    Thanks!

  7. Sir how can I fix this :

    if (isset($_GET['edit'])) {
    $id = $_GET['edit'];
    $update = true;
    $result = $mysqli->query("SELECT * FROM data WHERE id=$id") or die($mysqli->error());

    if (count($result)==1) (error)
    {
    $row = $result->fetch_array();
    $name = $row['name'];
    $location = $row['location'];
    }
    }

    thank you

  8. Hi Clever tech, i managed to follow through this tuitorial, thanks alot. one this that does not work out well is the update , im able to save but update is throwing an erro of undefined variable, i declair it on th e process.php but still update cannot seem to work wjats the fix ?

Leave a Reply