82 thoughts on “Learn to submit HTML data to MySQL database using php

  1. goodday my name is eban emmanuel am a student in ghana. ive been learning html5 and ive got little issues with creating a form when creating a form in html5 the form webpage must it be stored as .php or can i store it as a html and connect with a phpscript connecting to my xamp database ..really need this for ma project will be glad to hear back from you

    1. From what I’ve read the only difference between the html and php extensions are the extension themselves in other words you can have a php file that contains onlt html and vise versa. The big reason to use a php file extension is so as a developer you know that file contains php code. I like masking the files that contain php so that when I call them the user is not alerted to one I’m on a lennox server and two this file my contain code which can be hacked if you are good with php.

  2. There are some mistakes here, but the majority of your code is ok. Thank you for this tutorial.

  3. I typed process.php but when I run it it is not working, it show me that

    Notice: Undefined index: first_name in C:\xampp\htdocs\addemp\process.php on line 3

    is there something i lost?

  4. I make HTML web on my computer desktop after that i installed xampp and xampp -> htdocs folder i make login php so, my question is that do i need to make index.php on it or not if so how about html that i created on desktop.that index.html also i have to move on xampp -> htdocs folder

    1. Hi,
      In the index.php file, in the line 13, please change line to
      Save again index.php, open it and and should work.

  5. Hello there, I do believe your site could be having browser compatibility
    problems. Whenever I take a look at your web site in Safari, it looks fine however, if opening in Internet Explorer, it’s got some overlapping issues.
    I merely wanted to provide you with a quick heads up!
    Besides that, fantastic site!

  6. These problem dedected in xampp control panel ? plz give me it’s solution. plz sir

    11:56:14 AM [mysql] MySQL Service detected with wrong path
    11:56:14 AM [mysql] Change XAMPP MySQL and Control Panel settings or
    11:56:14 AM [mysql] Uninstall/disable the other service manually first
    11:56:14 AM [mysql] Found Path: C:\xampp\mysql\bin\mysqld –defaults-file=C:\xampp\mysql\bin\my.ini mysql
    11:56:14 AM [mysql] Expected Path: c:\xampp\mysql\bin\mysqld.exe –defaults-file=c:\xampp\mysql\bin\my.ini mysql

  7. When I followed the series of steps you given above, I got an error message like this:
    Parse error: syntax error, unexpected ‘index’ (T_STRING), expecting ‘,’ or ‘;’ in C:xampphtdocsaddempprocess.php on line 19.
    Kindly get me the rectification for the above error.

    1. I am getting the error below after putting a comment section

      Notice: Undefined index: first_name in C:\xampp\htdocs\addemp\process.php on line 6

      Notice: Undefined index: last_name in C:\xampp\htdocs\addemp\process.php on line 7

      Notice: Undefined index: department in C:\xampp\htdocs\addemp\process.php on line 8

      Notice: Undefined index: email in C:\xampp\htdocs\addemp\process.php on line 9

  8. This page certainly has all the info I needed concerning this subject and didn’t know who
    to ask.

  9. I am a student of imfi ict academy uyo, please How can i partition my site to have many columns and rows without using table?

  10. Guys Help this is my process.php

    and this is my index.php

    label
    {
    display:inline-block;
    width:150px;
    margin-bottom:10px;
    }

    Add Applicant

    Add Applicant

    First Name:

    Last Name:

    Passport Number:

    Date of Birth:

    Place of Issue:

    Date of Expiration:

    Email:

    and my database.php

    but it does not connect or save to my data base. Am i doing something wrong. please help

  11. I have to make a website in html.
    In which if the staff name and password correct then he can add documents.
    So how to make database and how can I connect with it with HTML file.

  12. 1st
    in process.php in the first two printscreens you don’t close the php it supposed to be like that? if yes then i have error when i’m running this file:
    Notice: Undefined index: first_name in C:xampphtdocsaddempprocess.php on line 4
    Notice: Undefined index: email in C:xampphtdocsaddempprocess.php on line 6

    2nd
    in the modification of process.php
    “<?php
    print_r($_POST); "
    my output is this: "Array ( ) "

    3rd
    You don't mention to create a database; what records, what data type … these infos are missing from the first steps when you first tell to open phpmyadmin to see the results!

    1st
    in process.php in the first two printscreens you don't close the php it supposed to be like that? if yes then i have error when i'm running this file:
    Notice: Undefined index: first_name in C:xampphtdocsaddempprocess.php on line 4
    Notice: Undefined index: email in C:xampphtdocsaddempprocess.php on line 6

    2nd
    in the modification of process.php
    "<?php
    print_r($_POST); "
    my output is this: "Array ( ) "

    3rd
    You don't mention to create a database; what records, what data type … these infos are missing from the first steps when you first tell to open phpmyadmin to see the results!
    4th
    in last insertion of data after executin index and then going to process.php
    " Parse error: syntax error, unexpected 'index' (T_STRING), expecting ',' or ';' in C:xampphtdocsaddempprocess.php on line 19 "

  13. Please folks, I’m just taking programming as a career and I’m loving it despite discovering the tasking part of it. For this I’m beginning with web design and development, still a fresher in it I can say I am, but believing persistent practice makes perfect. Now, the issue I’m facing is, I added password to my MySQL from the console and I discovered my phpMyAdmin shows me error anytime I try to access it. Please, any idea to come out of this will be highly appreciated. WampServer is what I use for more certainty in proffering solution. Thank you

  14. guys help me to find a solution for this problem:
    i have an php document with html form
    and i have date formated textbox
    i want to upload that data into the database using php

  15. Parse error: syntax error, unexpected ‘>’ in C:\xampp\htdocs\addemp\process.php on line 1
    this error is displayed for process.php file . please give me the solution for this

  16. That is the proper weblog for anyone who wants to search out out about this topic. You realize so much its virtually exhausting to argue with you (not that I actually would want…HaHa). You undoubtedly put a brand new spin on a subject thats been written about for years. Great stuff, simply great!

  17. I have recently started a web site, the info you provide on this web site has helped me greatly. Thanks for all of your time & work.

  18. Just wanna input on few general things, The website layout is perfect, the written content is very good : D.

  19. Thank you so very much! It took me hours to get it to work (mistakes here and there) but I think I learned a lot on the way. All the best to you.

  20. Hello Dear ,
    I have just visit your blog & found your blog’s post are very useful . I like Your every post because you have discussed what I am looking for . Thank you For your nice posting . I hope That You will be continuing this kind of posting .

  21. Hello there, You have done a great job. I’ll definitely digg it and personally recommend to my friends. I’m confident they’ll be benefited from this web site.

  22. Parse error: syntax error, unexpected ‘index’ (T_STRING), expecting ‘,’ or ‘;’ in C:\xampp\htdocs\login\process.php on line 19

  23. Hi there very nice site!! Guy .. Beautiful .. Amazing .. I will bookmark your web site and take the feeds additionally…I am glad to find numerous useful info right here in the submit, we’d like work out more strategies in this regard, thanks for sharing.

  24. Hello to every body, it’s my first pay a quick visit of this website; this website carries awesome and truly excellent data for visitors.|

  25. I¡¦ve recently started a site, the info you provide on this web site has helped me greatly. Thanks for all of your time & work.

  26. $myname = mysqli_real_escape_string($db,$_POST[‘nameg’]);
    for this,it is displaying Undefined variable: myname in C:\xampp\htdocs\gphp.php on line 15
    how to resolve this??

  27. This post will help the people who are looking to build up new website or even a weblog from start to end.

  28. Hey great post! I hope it’s alright that I shared it on my Twitter, if not,
    no problem just tell me and I’ll delete it. Regardless keep up the
    great work.

  29. Thanks , I have just been searching for information approximately
    this subject for a long time and yours is the greatest I have came upon till now.
    But, what in regards to the bottom line? Are you sure about the supply?

  30. I have read so many articles concerning the blogger lovers however this
    article is actually a nice article, keep it up.

  31. As I follow your instructions and steps as follows It worked well for me. If you face any issue in hp services you can visit us at our site.

  32. As the guidelines mentioned in your post to submit HTML data to MySql database are nice to follow.

  33. when i tried to run this is what happened. please help me with this.
    Parse error: syntax error, unexpected ‘>’, expecting end of file in C:\xampp\htdocs\project\process.php on line 2

  34. Your process.php has some problem, I think form php is not link with process.php. In process.php always show

    Notice: Undefined index: first_name in C:\xampp\htdocs\process.php on line 3

    Notice: Undefined index: email in C:\xampp\htdocs\process.php on line 5

  35. i too am a student . my localhost server doesnt processphp file rather it displaysall the code as it is .how to fix this .i will be grateful to who answer it .

  36. Hai, can I know how to send data using php without tag form method by clicking specified button ???

  37. Hi albert, Greetings!

    If you properly created the table(employees1) inside the database(mydatabse) then it should work with below codding as per the nice guide lines given by the Author in this tutorial…….!!!

    Cheers!

Leave a Reply

Your email address will not be published. Required fields are marked *