How Build a Simple HTML Form Using PHP and MySQL




Get the source code here: http://www.johnmorrisonline.com/lesson/build-simple-html-form-using-php-mysql/ In this lesson, you’ll discover how to build an PHP …

Original source


30 responses to “How Build a Simple HTML Form Using PHP and MySQL”

  1. sir,

    I watched your video as a review to what I want to do.

    I am not sure what I need a PHP script or an HTML script for the next step

    I created a short online presentation with a quiz at the end, now I want to print a certificate of completion for everyone that participated.

    I have watched over 75 different youtube videos on how to create/print a certificate using PHP & HMTL. without any luck.

    Any ideas or help would be great

  2. Please help. when i run the demo.php i get this error:
    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:xampphtdocsdemo.php:8 Stack trace: #0 {main} thrown in C:xampphtdocsdemo.php on line 8

    for this line of code:
    $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

    Any help would be much appreciated.

  3. I don't understand how people "thumbs-down" these videos. You speak in a tone that's easy to understand, you make it easy to understand what and why you are doing a certain statement, and I've worked through a number of your videos. Thoroughly impressed with your teaching skills. I learned a tremendous amount by doing this and got it working with no issues or problems. I feel confident enough in my own skills now to be able to help others with it too. I did this video once and got everything to work, so trying to figure out what people have issues with.

    Thank you!

  4. This isn't working for me. I have copied your HTML and PHP exactly. I'm trying to do this locally, using MAMP.

    I'm not getting could not connect error, or a cant use error. The page says this 'The localhost page isn’t working localhost is currently unable to handle this request.'

    Checking my error logs within MAMP i get this error;

    PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /…/demo.php:10
    Stack trace:
    #0 {main}
    thrown in /…/demo.php on line 10

    the line mentioned is this code here; $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

    Is there something i've missed or a typo i've not spotted! this is driving me crazy….code below;

    <?php

    define('DB_NAME', 'xxx');
    define('DB_USER', 'root');
    define('DB_PASSWORD', 'root');
    define('DB_HOST', 'localhost');

    $link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD);

    if (!$link) {
    die('could not connect: ' . mysql_error());
    }

    $db_selected = mysql_select_db(DB_NAME, $link);

    if (!$db_selected) {
    die('cant use ' . DB_NAME . ':' . mysql_error());
    }

    echo 'connected successfully';

    ?>

Leave a Reply