[PART 2]ADD DYNAMIC FIELDS TO FORMS WITH JQUERY AND PHP

  Рет қаралды 23,717

PHPBasics

PHPBasics

Күн бұрын

Пікірлер: 72
@henriquehims
@henriquehims 3 жыл бұрын
Thank you very much. You are a great teacher. great teaching. A Brazilian subscribed to your channel
@okezie7211
@okezie7211 7 жыл бұрын
You have given me a rare opportunity to learn without much stress. So oo simple and on point explanation. Thank you for this....
@phpBasics
@phpBasics 7 жыл бұрын
Thank you very much. If you need any assistance, let me know. My Skype is CoolEditz
@hamidi88habib57
@hamidi88habib57 4 жыл бұрын
great for learning tnq alot
@ShahzadAli-ni6ny
@ShahzadAli-ni6ny 6 жыл бұрын
thumbs up bro!!! you really are a great teacher.
@shekharmehta2506
@shekharmehta2506 7 жыл бұрын
How does one add select data to a field (from mysql ) and have this duplicated when the rows are added. THis is a great tutorial... but where does one get the source code.
@manojchacko4203
@manojchacko4203 4 жыл бұрын
Hi great tutorial, I had one quick question, how do you set it up so that on post back make sure the values are retained because if not someone hit submit but missing something and on postback if this field refreshes dont want to have to type it all again. Similarly if I am editing this for how do I retrieve these values from the database and display such the functionalit stays the same
@phpBasics
@phpBasics 4 жыл бұрын
Something like this -
@manojchacko4203
@manojchacko4203 4 жыл бұрын
@@phpBasics yes, but how do you this for the dynamically generated fields, like the ones you have on the video, upon submission, if there is an error on the form don't want the dynamically generated fields to reset
@stevewillis544
@stevewillis544 3 жыл бұрын
Hey you should update more! You have a great teaching style
@phpBasics
@phpBasics 3 жыл бұрын
I appreciate the feedback. I have new content coming soon :)
@jim9408
@jim9408 4 жыл бұрын
Hey Shawn, I am a big fan of your tutorials. I should start off by stating that I am new to programming. Here is what I am trying to do and I am struggling: Right about at your 10 minute mark in this video. Ok. I am trying to enter data from an array, with an SQL query, using PDO, using a prepared statement, using :placeholders. I can execute the prepared statement no problem. Following your tutorials, I can add additional rows to my form, remove excess rows, submit the data, then, enter the data from multiple rows into the database. However, I am having trouble figuring out how to sanitize/filter the data before it is inserted into the database. Usually, when I enter data from a form I use this line of code because the information is not from an array: $company = filter_input(INPUT_POST, 'company', FILTER_SANITIZE_FULL_SPECIAL_CHARS); Do you know of a way to sanitize/filter the data using a prepared statement with placeholders? Or, should I abandon the prepared statement/:placeholder method in favor of the method you describe in this tutorial? I hope this makes sense. Thanks in advance. Jim Update: I found a way to make this work. Right after you check if the form has been submitted (Line 5 ), enter the "filter_input_array" function like this: $_POST = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
@R0b3
@R0b3 3 жыл бұрын
Good job dude!!! Is it possible use same logic in order to insert multiple record into different tables with foreign key?
@pearlabotsi2861
@pearlabotsi2861 4 жыл бұрын
So awesome thank you! God bless
@AAplayer13GOA
@AAplayer13GOA 7 жыл бұрын
Have you thought about doing a web series on creating a modern website from scratch? It would be interesting to see the process from your point of view and to see what route you take. Good video btw.
@phpBasics
@phpBasics 7 жыл бұрын
Is there a particular style of website you're interested in seeing? I could definitely put something like that together, but I'm not much of a front end designer.
@AAplayer13GOA
@AAplayer13GOA 7 жыл бұрын
A good example could be a website where users can review products. Each user would have their own accounts and ability to interact with each other maybe. There could also be a search functionality within the website.
@JoseHernandez-ln7sr
@JoseHernandez-ln7sr 4 жыл бұрын
Good evening, I have a small inconvenience, because I have the code to generate dynamic fields, but then when saving the data in the database it does not save all of them, that is, I create 3 columns of 4 rows each and only save the last four rows.
@WaDalai1
@WaDalai1 3 жыл бұрын
you just saved my life, thanks
@karthikrish5341
@karthikrish5341 3 жыл бұрын
Hi sir this video is more using for me i have an doubt how i insert primary key and foreign key in that table like to reference another table
@naveedansari3462
@naveedansari3462 4 жыл бұрын
How Can I add Dropdown lint in dynamic fields? Please must reply.
@josephlongo3991
@josephlongo3991 7 жыл бұрын
Great tutorial! Ironically, I am trying to do the opposite of this. I have an HTML element that is dynamically populated from a MySQL database. The table contains the serial numbers of car seats available for rent. Sometimes, people rent multiple car seats and therefore, I would need to "add" as many car seats to their order form as necessary. Would I use the same process for select elements that are dynamically populated as you did?
@phpBasics
@phpBasics 7 жыл бұрын
I would populate the first select tag and then copy it the way I did. That way you don't have to keep querying the database
@josephlongo3991
@josephlongo3991 7 жыл бұрын
phpBasics after I've populated it from the database, I would in essence follow the video, making minor adjustments where necessary?
@phpBasics
@phpBasics 7 жыл бұрын
Yes. You can skype me if you run into problems. CoolEditz
@zibbp97
@zibbp97 6 жыл бұрын
Is there a way to insert all fields under 1 ID in the database?
@akhilkazi1454
@akhilkazi1454 4 жыл бұрын
Hello sir, I have a data working with rows counting. I want to it counted when inserting and deleted record seperately.
@carminevacirca3891
@carminevacirca3891 5 жыл бұрын
Great instructional video. Although I populate more than one row of data within the form. When I retrieve it to update my database only the first row of the array contains data. What am I doing wrong.
@carminevacirca3891
@carminevacirca3891 5 жыл бұрын
nevermind figured it out.
@SandeepSingh-me4hx
@SandeepSingh-me4hx 6 жыл бұрын
Awesome tutorial, it helped me a lot. Also please can you help me, how can I add a select dropdown with data from database. Or do you have any video tutorial of that... Thanks a lot once again...
@phpBasics
@phpBasics 6 жыл бұрын
I will do that.
@kambhampatis
@kambhampatis 7 жыл бұрын
Excellent video. can you post code using PDO for inserting multiple rows of data into sql table? the php version you have used is older and I am unable to make it work.
@raceinsviet
@raceinsviet 4 жыл бұрын
how to same value add sql table. plz explain
@theresiaalfareja8840
@theresiaalfareja8840 3 жыл бұрын
Thanks for th tutorial. But on my web page , checkbox doesn't work properly in the var html. Can you help me?
@nitheeshkumark7947
@nitheeshkumark7947 4 жыл бұрын
Thanks a lot for the video sir.. It greatly helped me.. Can you please assist me in the following scenario?? So, along with the fields that you have taken, I have included order Id also in the form... and to that order Id.. I have given the auto numbering code... So.. for the parent field.. the automatic number system is working as expected. However, for the child field.. i.e., for the fields with the Add more link are not getting automatic numbers.. How can we resolve this.. please explain..
@shilpa-m-21
@shilpa-m-21 6 жыл бұрын
how to make one of the fields have a drop down box with options as values from a mysql database
@phpBasics
@phpBasics 6 жыл бұрын
I have a video on that.
@shilpa-m-21
@shilpa-m-21 6 жыл бұрын
i found it, but that shows a static drop down box . I wanted to make one of the fields shown in the above video itself as a drop down box.
@sultan2058
@sultan2058 2 жыл бұрын
Sir, I have two tables. (Users) (Posts) and I linked it to something called (Foreign Key) but I want to display one user's posts among other users' posts. I'm always looking for this thread, but I can't find who explains it and fetches single user posts, if you know this please explain it in a video in php - pdo
@phpBasics
@phpBasics 2 жыл бұрын
You can Skype me if you'd like: COOLEDITZ
@sultan2058
@sultan2058 2 жыл бұрын
@@phpBasics I don't have an account but I will create
@rajuahmed695
@rajuahmed695 7 жыл бұрын
how do you remove them from the data base, cause you added to it, how do u remove it
@mahammadarafijalalanavar550
@mahammadarafijalalanavar550 7 жыл бұрын
can you please describe how to retrive data in same fields
@phpBasics
@phpBasics 7 жыл бұрын
I don't understand what you mean.
@mahammadarafijalalanavar550
@mahammadarafijalalanavar550 7 жыл бұрын
1) i mean fetching data from data base and edit the inputs and again update the input fields and insert new inputs with updated inputs . 2) can i write insert and update queries at a time ??
@stevefernando3295
@stevefernando3295 4 жыл бұрын
Hi can you help how to create a form from the excel upload with the db data!
@phpBasics
@phpBasics 4 жыл бұрын
I believe so. Feel free to reach out on Skype: CoolEditz
@MandOBros
@MandOBros 7 жыл бұрын
Currently getting this error, and the last field to be sent doesn't appear in the database
@MandOBros
@MandOBros 7 жыл бұрын
Undefined offset: 1
@phpBasics
@phpBasics 7 жыл бұрын
Undefined offset typically revolves around the array key. It means you're referencing a key that's not valid. Make sure you're starting at 0 and not 1. If you have any other issues, send me a message on Skype. CoolEditz
@rishavnishant
@rishavnishant 7 жыл бұрын
If I am trying to send the contents of these dynamic variables in an email using php. How do I address these variables in my external php file? $make=$_POST['make']; ---- What would be the variable for the next make?
@phpBasics
@phpBasics 7 жыл бұрын
Check out the foreach function in PHP.
@rishavnishant
@rishavnishant 7 жыл бұрын
Thank You for taking out time to respond, I would try that now!
@theadedheart2307
@theadedheart2307 5 жыл бұрын
mine only adds the first row to db..can anyone please tell me why its happening? followed the tutorial step by step
@phpBasics
@phpBasics 5 жыл бұрын
Hi, Jane. If you'd like to send me your source code, my Skype is CoolEditz
@VeljkoBijelivuk
@VeljkoBijelivuk 6 жыл бұрын
if i add 1 row, it works and make, model and serial values are written in db, but if i add multiple rows it does not work. i'm not getting an error but mutliple values are not written into db. anybody has any clue? (code is exact copy of code from video)
@VeljkoBijelivuk
@VeljkoBijelivuk 6 жыл бұрын
found it, fixed it :-)
@utkarshsharma4432
@utkarshsharma4432 6 жыл бұрын
I am having the same problem. How did you fix It?
@carminevacirca3891
@carminevacirca3891 5 жыл бұрын
@@VeljkoBijelivuk what was your solution? I am only able to populate the first row of the array within the form. What am I doing wrong?
@MelatiSenja123
@MelatiSenja123 3 жыл бұрын
How to prevent duplicate entry?
@phpBasics
@phpBasics 3 жыл бұрын
Do a query against the database for that serial number before the insert. If number of rows returned is NOT 0, then that item already exists.
@erosmarcuszamora8828
@erosmarcuszamora8828 5 жыл бұрын
please upload the same tutorial but with the radio input.
@anilvrathod
@anilvrathod 6 жыл бұрын
How can convert these data in to json
@janzca6829
@janzca6829 4 жыл бұрын
Really thanks
@jasuabetv2296
@jasuabetv2296 7 жыл бұрын
real_escape_string not working T.T HELP!!
@phpBasics
@phpBasics 7 жыл бұрын
If you're incorporating this into your own code, make sure you're using NEW MySQLi to connect to your database or it won't work.
@wweuniversenepal6707
@wweuniversenepal6707 6 жыл бұрын
can anyone help me with the num_rows key word
@shebinsilvister2632
@shebinsilvister2632 6 жыл бұрын
Great man ..Thanks!!
@rojawaddepalli7455
@rojawaddepalli7455 6 жыл бұрын
how to do this in java netbeans
@hemasingamsetty5555
@hemasingamsetty5555 4 жыл бұрын
hi sir can u show us how to upload & save an image into database using this concept
@noor-dev
@noor-dev 6 жыл бұрын
How to use this code using codeigniter
ADD DYNAMIC FIELDS TO FORMS WITH JQUERY AND PHP - PART 1
17:03
Laravel Tutorial For Beginners (Simple User CRUD App)
1:16:13
LearnWebCode
Рет қаралды 211 М.
24 Часа в БОУЛИНГЕ !
27:03
A4
Рет қаралды 7 МЛН
Жездуха 42-серия
29:26
Million Show
Рет қаралды 2,6 МЛН
PHP PAGINATION IN 10 MINUTES
11:58
PHPBasics
Рет қаралды 19 М.
Solving one of PostgreSQL's biggest weaknesses.
17:12
Dreams of Code
Рет қаралды 220 М.
Stripe Checkout & Card Payment using PHP
28:24
876WilliamsTechJA
Рет қаралды 120
PHP Results WITHOUT REFRESHING
11:23
PHPBasics
Рет қаралды 20 М.
JSON and AJAX Tutorial: With Real Examples
40:45
LearnWebCode
Рет қаралды 1,8 МЛН
Add Remove Select Box Dynamically using Jquery with Ajax PHP
25:02
Inline editing with Jquery/PHP/MySQL
32:03
PHPBasics
Рет қаралды 13 М.
Live Table Add Edit Delete using Ajax Jquery in PHP Mysql
20:40
Webslesson
Рет қаралды 327 М.