MySQL Tutorial 2 – Inserting entries into database




In this tutorial I teach you how to insert values into the database, another important part of databases as you need a way always for users to add comments on …

Original source


9 responses to “MySQL Tutorial 2 – Inserting entries into database”

  1. Thanks by the way for the tutorial. My question is why the code did not work. Here is the code for reference:

    $name = "John";
    $last name = "Doe";

    $query = mysql_query("insert into customer values ('','$name', '$last name')");

    Thanks Again

  2. I have a form page to add user information to a database and I want some of the fields to be optional. If all fields are filled in, it works perfectly. But if any of the form fields are blank, nothing adds. How do I get the blank form fields to translate into simply leaving the database field blank?

  3. The script you are using here is amended by the fact you have deleted the echo statements, can I assume they can be left in?

    Clear and concise tutorials, only just found them, do plenty more.

Leave a Reply