Thank you so much for these tutorials. I have gotten into PHP using your videos and I’ve watched so many already to incorporate them in my projects. You are a big inspiration!
Thanks Dani! I have a doubt ... when I try to update the user and hit update it completes the try and everything seems to be ok, but when I see the database it doesn't delete the record, but delete the data inside the cells of the table.
Dani why you put number 2 directly in the update statement you have to put it ? or named parameter then bind it with bindParam method with other arguments
ANY data submitted from the HTML form, HAS to be replaced by a parameter in the query, and be submitted separately using the bindParam(). 🙂 Even if it is data that we created and submitted using a hidden input in the HTML form, since the user can manipulate that data using the build in developer tool in the browser. Any data that we add directly inside our PHP script, does not need to be a parameter, since the user doesn't have access to that, and didn't have an opportunity to "attack us" using that data. 🙂 Because I added the "2" inside the script directly, the user never had a chance to "mess with it". So therefore it is safe.
@@Dani_Krossing Ohhhhh okk just yk in websites usually u just click "Delete Account" button and it happens. But i think for changing username / password / email is good
Hello Dani, I am following along with your tutorial for updating data and I am getting a few different errors. I am following your code verbatim and yet... still having issues.
I mean objectively the web dev path has better opportunities, and less risk involved if you want a solo career. Subjectively, I would love to work with games, but it would require more knowledge in that field on my end, and it’s a much too risky path for me to be comfortable with it as a career. I’m a self taught game dev, but actually have a bachelor’s in web dev. 🙂 which realistically at this point also makes it a better choice for me personally, since I yet don’t have the skills to get hired in a game company. But if you are looking for an objective answer, then web dev is the more stable industry. 🙂
Hi, I'm an Iranian student and I can't speak English well. I can't connect my database to php, and in the next output, when I click on the button, it prints from setAttribute to the end of the php tag as an error. Can you help me?
The hidden input field in HTML forms is used to pass data to the server without displaying it to the user or allowing them to modify it. This is useful for maintaining state, passing session information, or including additional context with form submissions.
i was following the previous lesson and managed to insert data to my database but now it is submitting empty data in the db table even if i have entered data to the form. what could be the reason ?
It means that your code on the next page, after submitting the form, isn't getting the data. Which means there is a typo in your code there. :) You are welcome to share the code here, if you can't find the typo.
When I update the information only the e mail gets updated. username and pwd gets deleted. Does anybody else have this problem. Anybody knows why this might be happening?
@@Dani_Krossing I might have missed it🫣 since I watched about most of your content. Not gonna lie your videos are a lot more beneficial than what some universities teach us. Got a full score on a project thanks to you. Stay safe and healthy buddy.👍🏻👍🏻
Thank you so much for these tutorials. I have gotten into PHP using your videos and I’ve watched so many already to incorporate them in my projects. You are a big inspiration!
So handy, so easy to follow and soo easy to understand. Hope more people can find your channel!
Dude your videos are definitely top, and next week I have a PHP exam please upload the videos as fast as possible❤
You are the best php teacher go ahead and upload videos daily then we need a course how to protect the website .
Thankyou so much. Now I know how to connect my website to a database.🙏
Thanks Kross. Your tutorial is really helpful
thanks dani, you are teaching almost everything a learner should know.
sir, I Love your tutorials it greatly helps me on my study on php to prepare for my college course subjects, thank you.
most clean tutorial in 2024, I'm impressed.
Waiting for next ep!
Dani Sir Please upload videos daily.... waiting for next
Hi Dani Great video 👍👍 I have a small Q, what if I want to update some other record other than id no. 2. Do I need to amend the query for this?
Thanks you for your explanation.
Is there also a way to fetch the database data automatically into an html table, using pdo?
Thanks Dani! I have a doubt ... when I try to update the user and hit update it completes the try and everything seems to be ok, but when I see the database it doesn't delete the record, but delete the data inside the cells of the table.
Dani why you put number 2 directly in the update statement you have to put it ? or named parameter then bind it with bindParam method with other arguments
It's because that 2 isn't data that was submitted by the user. 🙂 It is only user data you need to protect against.
@@Dani_Krossing you mean we put only the passed data in parameters and any direct data we put it in the script no need to put it in a parameter
ANY data submitted from the HTML form, HAS to be replaced by a parameter in the query, and be submitted separately using the bindParam(). 🙂 Even if it is data that we created and submitted using a hidden input in the HTML form, since the user can manipulate that data using the build in developer tool in the browser.
Any data that we add directly inside our PHP script, does not need to be a parameter, since the user doesn't have access to that, and didn't have an opportunity to "attack us" using that data. 🙂
Because I added the "2" inside the script directly, the user never had a chance to "mess with it". So therefore it is safe.
Halloow Dani, thx for the tutorial. In practical sense, what is the point of a website to have change user / delete user?
If you wanna update your profile info, like changing your registered email or username. Or if you wanna delete your account.
@@Dani_Krossing Ohhhhh okk just yk in websites usually u just click "Delete Account" button and it happens. But i think for changing username / password / email is good
Many thanks, I have issues with update "$id". It was showing error from undefined array, what should I do?
Hello Dani, I am following along with your tutorial for updating data and I am getting a few different errors. I am following your code verbatim and yet... still having issues.
Dani sry for that but what would you take for a Carrer if you have the choice Game Dev or Web Dev
I mean objectively the web dev path has better opportunities, and less risk involved if you want a solo career.
Subjectively, I would love to work with games, but it would require more knowledge in that field on my end, and it’s a much too risky path for me to be comfortable with it as a career.
I’m a self taught game dev, but actually have a bachelor’s in web dev. 🙂 which realistically at this point also makes it a better choice for me personally, since I yet don’t have the skills to get hired in a game company.
But if you are looking for an objective answer, then web dev is the more stable industry. 🙂
@@Dani_Krossing thanks 🙏❤️
Can we get a pop up or something saying that the update or delete Successfully 😁😁 am just being curious or something..
Hi, I'm an Iranian student and I can't speak English well. I can't connect my database to php, and in the next output, when I click on the button, it prints from setAttribute to the end of the php tag as an error. Can you help me?
Is the info inside your $dsn variable correct?
what is hidden input field in html and why we use it and can we implement it??
The hidden input field in HTML forms is used to pass data to the server without displaying it to the user or allowing them to modify it. This is useful for maintaining state, passing session information, or including additional context with form submissions.
i was following the previous lesson and managed to insert data to my database but now it is submitting empty data in the db table even if i have entered data to the form. what could be the reason ?
It means that your code on the next page, after submitting the form, isn't getting the data. Which means there is a typo in your code there. :)
You are welcome to share the code here, if you can't find the typo.
@@Dani_Krossing would the typo be in the form handler?
Sir
Give us laravel 10 tutorial pls
I want to create a database for user comments
When I update the information only the e mail gets updated. username and pwd gets deleted. Does anybody else have this problem. Anybody knows why this might be happening?
I just figured that having the formhandler in the same directory is causing the issue. I deleted it from the directory and it is fixed.
I did that but no change@@niyaziguven7124
yeah, forgot to mention getting a haircut :)
I mentioned it at the start of the last episode 😉 I had to get it for health reasons
@@Dani_Krossing I might have missed it🫣 since I watched about most of your content. Not gonna lie your videos are a lot more beneficial than what some universities teach us. Got a full score on a project thanks to you. Stay safe and healthy buddy.👍🏻👍🏻