How to Connect HTML Form with MySQL Database using PHP
Vložit
- čas přidán 30. 03. 2019
- Source code Link : github.com/Tariqu/database_co...
In this video you will learn How to store form data into the database
First of all to send the form data into the database we need a server side programming language which will take form data and that program will make a connection with database and then using sql insert query will store the form data into database.
=============================================
For any Business enquiry contact us
Gmail :- tarique.rkl@gmail.com
WhatsApp :- +917978073704 (for only business query)
=============================================
Here I have used php as a server side programming language and MySQL as a database
To Send The form data to server side php file we have to specify php file name inside the form tag using action attribute so this php file will execute when we will submit this form
we have two different method to send the data to sever GET or POST post method is more secure way to send data to the server side
In php to get the data which is send from client side we have to use appropriate global variable if client send data using post method then we have to use $_POST if client has send using GET method then we have to use $_GET variable to get that data
after getting the data at server side We have to do a Connection with the database. PHP provide the Full support and method to do MySQL database connection in php
Prepare method save your query from sql injection
prepare method provide the binding mechanism to bind the data at run time not at compile time
#HTML_Form #MySQL #PHP
~-~~-~~~-~~-~
Please watch: "MySQL Database connection in java 12 using eclipse 2019"
• MySQL Database connect...
~-~~-~~~-~~-~
Thanks so much, Babaji. Your tutorial is wonderful, very clear, straightforward, and brief. I have tried a lot of Html form data to MySQL database using PHP tutorial, but this one stands out. 5* for you. Kindly give us training on how to retrieve all data, retrieve specific data, delete and modify data from database, through the form. Once again, thank you.
bruh My teacher took 2 hours to explain it and I didn't get it but after watching this video I finnaly do. Thanks man
My professor didn’t even bother explaining it. Basically told us to just go figure it out.
Bro you can't believe..... My teacher send me this video to me..😅😅😆😆😆😆
@@crazymarkaam😅😅😅
@@andypoon8176 how much are you paying to get scammed like this bruh
i tried to save it isnt working
Nice and precise! Thank you for this wonderful tutorial
Exactly what i was looking for, thanks a lot! Very good and on point explaining 👍
Sound = Best
Editing = Best
Explanation = Best
Souse Code = Available for Free
Working = Yes.
Tested on = April 2020
Difficulty = Moderate. (edited)
Thanks Ansari brother. you made may day. Thanks a lot.
Can you explain how can you use source code by correction way please
My email
At494949@gmail.com
how its working whhen i click on submit nothing happened
I click submit button it shows the full php code..what I do?
@@akilankabilan2929 ss same problem what can I do for that to get the correct format of o/p
@@niraja1994 if it is showing the code that means you haven't started the apache server
Thank you so much for this video. Finally found a solution of what I was struggling!!
Short and sweet and worked perfectly, thank you for this!
You explained it very well and with clear HTML codes
After stuck for 4 months find out why my form can't stored data, finally I found you. Thank you dude!
im also not able to help me bro i got no 4months
Thanks man, I always wanted this kind of explanation. Great video.
Amazing explanation...finally found a detailed video explaining this ...very grateful 👍👍👍👍👍
thanks to you, i finally did my first website following your guidance
Fast, easy, working. Nothing to criticize.
the perfect video I am searching for...
you are mentor ever, you really make me understand how to create and connect registration forms ........am now just not a genius but am trying to be like that.... bravo sir...i don't want to missed out non of your tutorials please alert me
You are awesome man I understand everything about database connection php and free hosting. Thanks a lot
Woohoooo! that worked! finally, a tutorial that actually does it! +1 subscriber for you!
Thank you very much for solving a problem most developers face. I noticed in the video, a line Gender should be label for "gender" instead. I have successfully ran your code using that correction. Thank you very much. I also noticed the option for the database you used wasn't the default for mine: so i changed it to what you had which is "latin1_swedish_ci"
sorry can you write it out please,I still very much confused
@@RWC-Ichigo at time 1:17 of the video on line 25. This is wrong
Gender. It should be
Gender.
@@chidinmaogbazi5687 thank you so much💖
@@RWC-Ichigo at the time 4:13 of the video, the collation reads "latin1_swedish_ci", my default was not that. So i changed my default to what he stated.
You change it at the time of the video 3:02 Server connection collation, change to the "latin1_swedish_ci" and not your system's default
How wonderful 💯! After a whole day of struggle to create a client side database, it's finally remedied in just seven minutes. Many thanks bro😂👍
really helpful tutorial . thank you. its help me in my univ project . i'm beginner level in programming field .
This is what I was looking for 😀
Always love watching your videos bro👍💝 Would you please add a file upload too and save into db.
Hey!!!
Thank You so much bruh!
It's working fine and I'm glad I came across this channel! ❤🌌
Resolved my issue which i was facing for last 8 - 10 days . Liked ! Subscribed !
simple, effective and efficient execution
This is amazing VDO and really helpful for me thank you so much !
Thank you so much
Need help please
@@TechnicalBabaji1 ??????????????????????????
Really bro, just loved ur way of explanation ❤️
I am so grateful for this. I'm speechless. Thank you.
Balaji, the video was helpful. Can you help us with another video where the stored values are shown in a table with an edit and update option?
Source code Link: github.com/Tariqu/database_connection_php
Join my WhatsApp group
chat.whatsapp.com/GsuvlYqwHFT0E27pUikeY0
Support this
czcams.com/channels/1Sc4ubMjbJAllewXHgfl-g.html
nice and Great work in sampe way
kya phpmyadmin hmesha open rkhna hoga jb bhi website access krege ya registration krege pls tell me
@@mohit2942 yes dude.
One problem hai returned show kar raha hai
@@techgamermonu8902 brother please support me
N solution to your question is on github read it's documentation
Aur jyada support ke liye mere channel pe aawo🤗
Subscribe kar dena please
so clear and straight forward information. Thanks
thankyou bhaiya for you awesome content❤❤. i just connect my registration form through you php code in a few trial. Thanks a lot bhaiya 🤗❤
thank you for the tutorial! you saved my school project
hhhhh
Wow, can you send it over? I'm struggling rn...lol
@@Ms.Kim02 which type of developer are you?
@@eaglearmy8 can you help me on a project?
@@dewman7477 which type of project bruh?
You literally saved me. I have to show my project tomorrow. Thanks a lot
My project will be presented the day after tomorrow
Ive watched a lot of videos and tried many ways and this way finally worked. Thanks
Thank you, such a good video! and concise!
It can be done in a very simple way, but you made it more complex
tell us how master
pls make a tutorial XD
@@sidd8087 Ok.. I will make soon.. Stay connected
@@kumaranandraj269 sure man
@@kumaranandraj269 your channel is fucking blank i didn't see any tutorial you lazy asss 1 year has been past what have you done in this
thank you very much brother. Most of the tutorials are very complicated. They are not begginer friendly. But I enjoyed your tutorial as a php begginer.
Most welcome please subscribe my channel
@@TechnicalBabaji1
Please can i have your whatsapp contact? I need to ask you something please :
This video is absolutely amazing. Thank you!
يا سلاااااام عليك شرحك واضح وجميل ....مشكور دكتور
0:00 - 0:15 Demo
0:15 - 0:33 Channel Intro
0:33 - 0:55 Editing Form Code
0:55 - 1:04 Making PHP file
3:00 Creating Database
Thank you
Help me.. why mine is not showing in database that i entered? Bt the codes is fine
Then how can i retrieve it
Hey thank you for this information. what single code of line can i use to connect php database to an html page?
You are the Best Bro. Thanks for this information. This is what I have been looking for it.
Sir main aapko bata nhi sakta ki aapki video mere liye kitne helpful rayi hai Thanks sir 100times
If you have error like "cant find the address" or something..1)Try to put your folder with work files in localhost folder, which appears when your database provider active (XAMPP, OpenServer). 2) Make sure that your work folder have same name as your database (in this case "Test") 3) And the last, check that you authorizing without password (only login "root"). Otherwise, you need to change php code in column 10: $conn new mysqli ('localhost' 'root', '', 'Test'); Explanation: $connection type (server/folder name, login, password, file and database name);
According to the comments, I think author made this tutorial for those who is a little worked with DBs🤔
Done the same but am still getting my php codes when i click my "sign in" button
I got a Fatal error: Uncaught mysqli_sql_exeption can you help me?
i got the same problem. Did you find the solution? @@killy_hoffman2698
@@Mico166 did u you get it to work?
I have a little different program and I have this error
Fatal error: Uncaught Error: Call to a member function bind_param() on bool in C:\xampp\htdocs\form\conn.php:22 Stack trace: #0 {main} thrown in C:\xampp\htdocs\form\conn.php on line 22
it's not working...when I clicked on submit button it show connect.php file
Bro i have the same problem what you did to solve it?
@@mdhamidrazzaansari2887 I had the same problem and I tried this method and it worked for me. czcams.com/video/GQIjKpoi2zQ/video.html
@@mdhamidrazzaansari2887 you added method="post" in form? it fixed problem for me
Thank brother! the video was super helpful, God bless you man, keep update a great video
Even it's really hard to understand your word but good job this make me clear about php now. Thanks.
In which folder is the database stored? Is it in the same folder where you store your php files, or do you create a subfolder like when you do to put CSS, JS or images for example, or is it somewhere else?
by using phpmyadmin on a local or remote server
@@yudishbeeharry8849 yeah but where
help. i did every single code you made and i received no errors which is a good thing but my problem is that i can't see it in my database? what should i do? please reply :( this is for my school project :(
Colgate toothpaste.
@@buttchicks3254 thanks
@@anjcastillo7405 🙏
Same here....
Does anyone have a solution
Hello. I have the same issue at the moment. Could you figure it out?
Thank you so much for this informative video
Thanks for this kind of video ❣️
It really helps me to learn more and more
Thanx for sharing the code with us..Getting error uncaught error:call to a member function bind_param()on boolean plz help me reslove this..
I got same
Same thing, did you solve it ?
not working.
their is an error in bind_param(), i also google it but it still not working
Same issue here! How can I fix it?
@@forensisch360 create a database perfectly
great work and very helpfull respected sir
Thank you so much for this informative video . It's very helpful and understandable.
I keep getting this error, when I submit my form, and don't know how to solve it:
Fatal error: Uncaught Error: Call to a member function bind_param() on bool in /opt/lampp/htdocs/dbconnect.php:38 Stack trace: #0 {main} thrown in /opt/lampp/htdocs/dbconnect.php on line 38
Same error
Same error
@@mirenterprises6924 bhai apna database name ya table name check karo waha par koi galati ha tab ye error ata ha
Do exactly what is written by him.. Don't change anything... Then only it will work perfectly... Database name and column name should be exact as he has written... I also had this problem..
Save your data in test database
Like :- $conn=new mysqli('localhost','root',' ','test');
Hi, do you have a video about displaying a data from a MySQL database in an HTML webpage? Thank you!
try this one y2u.be/Hf8bJiRBPio
Thankyou Ahmed Bhai, your video is very helpful for us and you are quite popular in our college
Very good tutorial, thank you very much
After clicking submit button am getting php code and I have done exactly what you said then were is mistake taking place
how to resolve this now ?
any idea
@@kaustubhpunekar6187 no
exactly same quesry!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@rajeshbera4799 same here
@@tochyegeonu4736 what do you mean exactly? Please help!
I am still not able to connect to server.
Same here
Thanks so much, Babaji. what i was asking is what you have presented, its so far so good!!!!!!
What a great tutorial brother...
Access denied for user error.
How can i solve this?
Hey, Hello. First of all, thanks for such a great video. I followed all your steps. When I clicked submit in the form, I did not get any error nor successful message.I just got a blank page. What should I do now? Can any one please tell me?
plz i have same issue... in case your problem solved then call me on this number 9552828136
@@kalpeshbari2936 broo chill haha
Happens to me as well right now, if you ever fixed it - do you remember the solution?
Nice usefull video brother 👍👍👍👌👌👌🤗
Thanks man was really helpful !!!
ps : just subscribed
HTTP ERROR 405...... Can you please help me solve this problem. when i send the form it says HTTP ERROR 405.
czcams.com/video/8gAqgVrTLr8/video.html
plz sub my channel
Make sure to add these html and php under htdocs/test folder directory and open it as localhost/test bhai ji
Same problem to me
Place the project folder in the right place. In my case, I work on Ubuntu and by default, Ubuntu does not allow access through the web browser to any file apart of those located in /var/www. So I moved the project folder to the specified directory and then, it was possible to open up the index.html by referring to the project folder just as shown in the video (that is localhost/Test) Also such solution allowed me to write to the database correctly. Respond to this comment, if something is unclear.
@@OG_Rajput did you solve?
Hello! I wanted to test out your code on my own and it seems like i'm getting the problem of "Uncaught Error: Call to a member function bind_param() on boolean" on line 16 in connect.php . If you could offer any help that would be amazing!
same
Had the same issue. For me it was because I did not change the name of the table from "registrations" to what my table is called within the database.
for this issue whatsapp on 9413372284
contact on 9413372284
@@drewnixon6905 contact
Hi...am watching ur channel very lately but it helps for beginners much...thank yo...
wow that is wonderful explanation !
what data type can i put for date?
$stmt = $conn->prepare("insert into employee(name,age,salary,date_of_birth,date_of_join,qualificationq) values (?,?,?,?,?,?)");
$stmt-> bind_param("")
I used string
In my pc
When I click on submit the browser display automatically php coding on display
Please help me to resolv
It means you are not running php on server please run php on local server.. sometimes people forget to start local server either of these mistakes or both your doing
I got the exact same problem. How to i fix it? What to do exactly
Yaa me 2
Make sure you add your php file to htdocs in xampp folder
useful and this was what i was looking for.
You are my hero of the day, great Video that helps me a lot
Bro you have a great video but I don't know how to go in this website: localhost/phpmyadmin.
I can't go in. Please help me...
Do u have XAMPP
@@TechnicalBabaji1 where can I found it?
@@TechnicalBabaji1 Answer Please...
@@TechnicalBabaji1 I need it very much
@@TechnicalBabaji1 No, I haven't it.
An error coming
Uncaught fatal error call to a member function bind_param()on bool in C: xampp/htdoc....,
same
@@christianvhellavides1008 same here too
bro you save my life i cometely understand this💯
Thanks Technical Babaji, my weeks of sleepless nights are over because of this video. Thanks a lot!
fatal error: uncaught error: call to a member function bind_param() on boolean in c:\xampp\htdocs\test\connect.php:22 stack trace: #0 {main} thrown in c:\xampp\htdocs\test\connect.php on line 22
Reshma kind of the same error here! Did you found a solution?
I had got this same error and realized I forgot to setup the database according to his video. After I setup the database it worked just fine.
@@forensisch360 Don't forget to setup the database part according to his video...
@@billwilde8725 can you please explain
kindly shear the HTML code...
Check in description
Really helpful, Thank you so much
Thank you very much sir... Really hats off to you , you explained such complex things in such a easy and clear way....
@Tech Minati just cross check the database name and your table name .... still if you have issues i will give m mail id just send he files I'll check them :)
please help me with this
Fatal error: Uncaught Error: Call to a member function bind_param() on boolean in C:\xampp\htdocs\selection\connect.php:16 Stack trace: #0 {main} thrown in C:\xampp\htdocs\selection\connect.php on line 16
Same yar
Same
do you solve it ??
check variable names should be same as table rows name .
My form is connected to data base
If use form action="index.php"
So after submit the data not showing in data table
If i remove index.php from action="#"
So data is showing well
Where is the problem
Please tell
Thx
Nice video but you can try this one too y2u.be/Hf8bJiRBPio
Nice Job MR.
Thank you Babaji, tusi great ho!
I am getting fatal error:call to a non member function bind_param()
Please help
Same to same
Fatal error: Uncaught Error: Call to a member function bind_param() on boolean in C:\xampp\htdocs\w\connect.php:15 Stack trace: #0 {main} thrown in C:\xampp\htdocs\w\connect.php on line 15
Same error bro kuch idea kese slove kare
Same error! Did you find a fix yet?
@@charlesbabbage6786 I was getting the same error. make sure the database column name and name attribute value in your HTML are same.
this was perfect man this Chatgpt driving me nuts when it came to me got me doing configurations and idk what else when I was wanting to test a user registration I was downloading php file huh? but this made it clear and simple thank you
wow!nice video and I hope you got to the Interview
Don't work :( Uncaught Error: Call to a member function bind_param()
Please see bind_param() u did mistake there
@@TechnicalBabaji1 same not working
Doesn't work
this man saved my life
im subscribing
Very informative..Keep going man
This video Very Usefully Nice
Loved Your Video !! Thank You So Much Brother !!!! Keep it up
Love the work👌
It worked. Thanks a lot man!