Ralph man, you are a legend. You've taught me so much over the last few years, from beginner level html and css to this. When you say things they automatically make sense! Thanks a lot!
Thanks alot Mr...this kind of tutorial what I search for. Most of tutorial dont teach with the HTML form. You are really my hero Mr..(sorry for my bad English)
Hi Ralph....Well done! I am so happy to meet your vids. I like the way you explain (I don't know if it's my love of american accent :) ...discovered in late 90'S when I was a student there. Anyway, your way found a way stick things in my little brain. Thanks and please get me the way to your codes. My technique is to listen and watch carefully, then run through your code. Afterwards I do the tricky thing of getting relevance of the learned things with my ongoing "applications development projects"....A warm salute from Stockholm / Sweden
Thank you very much Ralph, this helped me a lot! Excellent explaining, i've never coded php before and I'm editing the code to fulfill my needs and actually understanding what I'm doing thanks to your explanations :D
I was wondering if you could do a multiphase webform to save responses into sql? Like it have multiple tabs? Not a registration form, but almost like survey where it's broken up into parts?
Good morning Ralph, only starting coding a week ago, i have followed the tutorial and I only change the names of my tables and fields. The form shows no errors or anything. Can enter data and use submit button, but the 1 record added line doesn't appear when i submit and it also doesn't give me error that it hasn't been loaded. Also doesn't update on mysql. Can i post the code somewhere for you to have a look at please. I know most of these post are from a year ago. Hoping the comment will still get to you. Is there any forums i can join where people can help me. I'm from South Africa and don't know anybody that does coding to ask for help. Also don't have money for courses so I'm doing all the free coding lessons i can find online and all the vids i can get on youtube. Other than that thank you. Very nice tutorial. Can understand everything you are saying and doing.
Hi, I like your videos. However, I had a hard time following it in order. Is there a way for you to index them so that we know which comes first. I end up looking at your videos still confused which should come first. each video is still very useful though. But following it sequentially will be very helpful. Thanks.
I have everything working from this tutorial but when I submit a blank form it adds the record to the db so get empty fields in db, is this something I have missed or does your form/DB do same?
+Ralph Phillips Thanks a lot for your excellent tutorial. Unfortunately I'm unable to store the data of a form in a database. I'd like to make some preliminary remarks, to give you all the information that can allow you to pinpoint the mistake/s I made: 1) I don't use XAMPP; 2) I use a Linux (Debian 8) Server where I've installed Apache, php and MariaDB Server; 3) The three files with the code below are saved in /var/www/html of my Debian Server; 4) I have a domain which -for privacy reasons- I'm gonna call "domain_name"; That being said, I report below -in addition to the code- step by step what I've done: I've created a form, form_2.php: ROUTE: ADDRESS: LATITUDE: LONGITUDE: HAZARD: RISK: I've successfully created a new EMPTY table (newtable) in my "mysql" database by using the code below (create_empty_table.php) and typing in: $ ----@localhost:/var/www/html$ php create_empty_table.php: I wrote the file form2_engine.php:
Thanks very much.....but typing in $ php create_empty_table.php with the code below: 1. .....I get error messages: PHP Warning: mysqli::__construct(): (HY000/1049): Unknown database 'dbname' in /var/www/html/create_empty_table.php on line 8 ConnectedPHP Warning: mysqli_query(): Couldn't fetch mysqli in /var/www/html/create_empty_table.php on line 25 PHP Warning: mysqli_error(): Couldn't fetch mysqli in /var/www/html/create_empty_table.php on line 28 Error creating table: PHP Warning: mysqli_close(): Couldn't fetch mysqli in /var/www/html/create_empty_table.php on line 31
How do you go about setting a form so that it saves into the database ONLY FOR THE USER LOGGED IN, so like all of the entries are saved to which username added it so in the future a single user might have added 20-100 new sets of the same data into the database fields? I would be so grateful if any wise coder could set me straight would save me an immense amount of time. Great tutorial btw.
I am seeing a lot of people using php but i'm writing a program that is doing the same thing but not using php code. Do you have a video that doesn't use php and instead describes how to do the exact same thing but using servlets
Notice: Undefined variable: newrecord in \database\index.php on line 65 - I see this at the bottom of my page. I have watched your video several times and I think I have your script done completely, but I keep getting this error.
+Lock And Loaded hello sir can you explain why im getting error Undefined variable: newrecord even i copy whats in video? cause there is no error in video tnx hope you reply
Hi. I just want to ask, when I am establishing a connection between database and php. It gives me error because it doesn't read the $conn. Why is that so? Please help me.
I have the following and it seems to be working but there must be a better way of writing it if(empty($_POST['isbn']) || empty($_POST['author']) || empty($_POST['title']) || empty($_POST['price'])) Any suggestions please?
Hi - thanks! Great video! However, I get the following message after writing all the code: Notice: Undefined variable: newrecord in C:\xampp\htdocs\insert_data.php on line 44 which is the same as yours (?>). I don't get the record added message obviously and nothing is added to the database. Can anyone advise what I might be doing wrong? Thanks!
Hello Ralph Phillips , your tutorial is very good but I have an error how do i resolve the problem. would you please help me atal error: Uncaught Error: Class 'mysqli_connect' not found in C:\xampp\htdocs\web\Submit1.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\web\Submit1.php on line 7 Thanks for your help.
I`m from Brazil, and I had spent 3 days searching and learning for what you explained in 11 minutes, ty so much , very good video
Thank you for posting this. There are so many inconsistent methods and tutorials out there but yours worked without a hitch. You are my hero.
Ralph man, you are a legend. You've taught me so much over the last few years, from beginner level html and css to this. When you say things they automatically make sense! Thanks a lot!
Excellent. Thanks for watching.
Thanks alot Mr...this kind of tutorial what I search for. Most of tutorial dont teach with the HTML form. You are really my hero Mr..(sorry for my bad English)
1 000 000 Thank You Ralph.
EXTREMEMLY EXCELLENT tutorials, these are SO useful!
Hi Ralph....Well done! I am so happy to meet your vids. I like the way you explain (I don't know if it's my love of american accent :) ...discovered in late 90'S when I was a student there. Anyway, your way found a way stick things in my little brain. Thanks and please get me the way to your codes. My technique is to listen and watch carefully, then run through your code. Afterwards I do the tricky thing of getting relevance of the learned things with my ongoing "applications development projects"....A warm salute from Stockholm / Sweden
You are doing the lord's work. Thank you good sir.
Couldn't agree more.
Thanks for a perfect tutorial, I've been fighting this for the past week, you helped me fix a couple goofy problems!!!
Thank you very much Ralph.
Thank you Ralph for such an amazing tutorial ...thank you man
Thank you very much Ralph, this helped me a lot! Excellent explaining, i've never coded php before and I'm editing the code to fulfill my needs and actually understanding what I'm doing thanks to your explanations :D
Awesome Job Man!. Thanks so much for taking the time to post this for us
Great that was the thing which i was searching for last 3 weeks thank you very much.you r great thanks again...
Thanks alot.. you the best
I was wondering if you could do a multiphase webform to save responses into sql? Like it have multiple tabs? Not a registration form, but almost like survey where it's broken up into parts?
Thank You! This has been such a help, what a great tutorial!
Hello, would you have the source files for this. Every time I hit the submit button it takes me to an error page.
Great Work... Thank u...!!!
Good morning Ralph, only starting coding a week ago, i have followed the tutorial and I only change the names of my tables and fields. The form shows no errors or anything. Can enter data and use submit button, but the 1 record added line doesn't appear when i submit and it also doesn't give me error that it hasn't been loaded. Also doesn't update on mysql. Can i post the code somewhere for you to have a look at please. I know most of these post are from a year ago. Hoping the comment will still get to you. Is there any forums i can join where people can help me. I'm from South Africa and don't know anybody that does coding to ask for help. Also don't have money for courses so I'm doing all the free coding lessons i can find online and all the vids i can get on youtube.
Other than that thank you. Very nice tutorial. Can understand everything you are saying and doing.
@charlene marais... How did u connect ur SQL database with ur php file .... Help me plzz.... Tnx in adv :-)
Thanks Ralph, you obviously know what you are talking about.
very useful! just like every other video of yours!
thank you Ralph. it was helpful
What if i wanted to use a select in my form and depending on what option i choose from the select it inserts into different tables?
Hi thank you very much, but I would also have the foreign key. How you do it? Thanks again
Lol, "Sally Struthers."
GREAT TUT! Thanks
Hi, I like your videos. However, I had a hard time following it in order.
Is there a way for you to index them so that we know which comes first.
I end up looking at your videos still confused which should come first.
each video is still very useful though. But following it sequentially will be very helpful.
Thanks.
I have everything working from this tutorial but when I submit a blank form it adds the record to the db so get empty fields in db, is this something I have missed or does your form/DB do same?
Thank you Ralph
+Ralph Phillips
Thanks a lot for your excellent tutorial. Unfortunately I'm unable to store the data of a form in a database.
I'd like to make some preliminary remarks, to give you all the information that can allow you to pinpoint the mistake/s I made: 1) I don't use XAMPP; 2) I use a Linux (Debian 8) Server where I've installed Apache, php and MariaDB Server; 3) The three files with the code below are saved in /var/www/html of my Debian Server; 4) I have a domain which -for privacy reasons- I'm gonna call "domain_name";
That being said, I report below -in addition to the code- step by step what I've done:
I've created a form, form_2.php:
ROUTE:
ADDRESS:
LATITUDE:
LONGITUDE:
HAZARD:
RISK:
I've successfully created a new EMPTY table (newtable) in my "mysql" database by using the code below (create_empty_table.php) and typing in: $ ----@localhost:/var/www/html$ php create_empty_table.php:
I wrote the file form2_engine.php:
try this one for sql :)
$servername = "localhost"; *
Thanks very much.....but typing in $ php create_empty_table.php with the code below:
1.
.....I get error messages:
PHP Warning: mysqli::__construct(): (HY000/1049): Unknown database 'dbname' in /var/www/html/create_empty_table.php on line 8
ConnectedPHP Warning: mysqli_query(): Couldn't fetch mysqli in /var/www/html/create_empty_table.php on line 25
PHP Warning: mysqli_error(): Couldn't fetch mysqli in /var/www/html/create_empty_table.php on line 28
Error creating table: PHP Warning: mysqli_close(): Couldn't fetch mysqli in /var/www/html/create_empty_table.php on line 31
How do you go about setting a form so that it saves into the database ONLY FOR THE USER LOGGED IN, so like all of the entries are saved to which username added it so in the future a single user might have added 20-100 new sets of the same data into the database fields?
I would be so grateful if any wise coder could set me straight would save me an immense amount of time.
Great tutorial btw.
what mechanical keyboard you use ?
Das Keyboard with cherry mx blue switches
hi can you help me check my code ?
I am seeing a lot of people using php but i'm writing a program that is doing the same thing but not using php code. Do you have a video that doesn't use php and instead describes how to do the exact same thing but using servlets
Notice: Undefined variable: newrecord in \database\index.php on line 65 - I see this at the bottom of my page. I have watched your video several times and I think I have your script done completely, but I keep getting this error.
+Brooks Bertelsen
+Lock And Loaded
hello sir
can you explain why im getting error Undefined variable: newrecord even i copy whats in video?
cause there is no error in video tnx hope you reply
+Brooks Bertelsen declare that varialble and initialize with 0 at starting of your php code as like in this video at line 2 eg:
+Nivlac Nocsab in this video at line 2 you should declare $newrecord and initialize with zero...............$newrecord="";
@@rajeevsharma160 nd y is that ??
Hi. I just want to ask, when I am establishing a connection between database and php. It gives me error because it doesn't read the $conn. Why is that so? Please help me.
I guess you need a control statement for that. The db doesn't recognises it by default
thanks for this tutorials
YOUR AWESOME DUDE THANK YOU SO MUCH
THank you very much for your tutorial, u got subbed :D
What code should I add to stop people from being able to enter blank fields?
Use a client side java script that looks for empty fields and stops the form (return false) from submitting to the Php.
Thanks a bunch friend.
You helped a lot. ;-)
I have the following and it seems to be working but there must be a better way of writing it
if(empty($_POST['isbn']) || empty($_POST['author']) || empty($_POST['title']) || empty($_POST['price']))
Any suggestions please?
Hi I tried it, but I got errors that the table I was trying to access was read only. How do I fix this please?
thank you!
Hi - thanks! Great video!
However, I get the following message after writing all the code:
Notice: Undefined variable: newrecord in C:\xampp\htdocs\insert_data.php on line 44 which is the same as yours (?>).
I don't get the record added message obviously and nothing is added to the database.
Can anyone advise what I might be doing wrong?
Thanks!
How did u connect ur SQL database with the php file.... I don't know how to connect : - ( .... Help me here ... Thanks in advance
how to avoid adding in duplicate primary key entry to the data base?
You don't updae the id, it should be set as the Primary Key and auto increments, the database takes care of the updating of the id field
I am so grateful thanks
THANK YOU. GREAT.
Hello Ralph Phillips , your tutorial is very good but I have an error how do i resolve the problem. would you please help me
atal error: Uncaught Error: Class 'mysqli_connect' not found in C:\xampp\htdocs\web\Submit1.php:7 Stack trace: #0 {main} thrown in C:\xampp\htdocs\web\Submit1.php on line 7
Thanks for your help.
How is the php if statement at the top being read if it comes before the form? I don't understand how that is working can someone enlighten me?
When you hit submit it runs the insert-data.php file.
✅✅✅✅😘😘😘😘
thanks a lot!!
THANK YOU
Thank you, you really save my bacon. X)
@Zodiaklag try mysql_connect instead :)
not working !!
can you help me
yes thankyou so many videos rubbish