PHP CRUD: Bootstrap Modal: Insert Data into Database in PHP

แชร์
ฝัง
  • เผยแพร่เมื่อ 10 พ.ย. 2024

ความคิดเห็น • 117

  • @muhammadzafar2470
    @muhammadzafar2470 4 ปีที่แล้ว +6

    thx bro , God Bless you , from PAKISTAN . ONE of best tutorial i have found on youtube . thanks you for providing us best tutorials palylist. i learn a lot of thing as a beginner level designer.

  • @centurionman1
    @centurionman1 2 ปีที่แล้ว +1

    God bless you. I have learnt so so so much from your simple way of teaching.

  • @emiliobruno9199
    @emiliobruno9199 2 ปีที่แล้ว +1

    Hi ! You are a great teacher ! Congratulations from Brazil !

  • @Re3v3s
    @Re3v3s 4 ปีที่แล้ว +5

    thx bro , God Bless you , From Thailand

  • @mulandulan
    @mulandulan 4 ปีที่แล้ว +5

    CEO of 'ok' anyways thanks for the help sir :D

  • @lovdli
    @lovdli 3 ปีที่แล้ว

    Thanks! You save my time a lot :-) cuz I struggle with inserting data from modal LOL

  • @kerynwong6079
    @kerynwong6079 3 ปีที่แล้ว

    thank so muchhhh💕this video have explained how the code run, it help me🙏🏻👍🏻

  • @mrdark4482
    @mrdark4482 2 ปีที่แล้ว

    great love from lidhar states

  • @michaeldark2496
    @michaeldark2496 2 ปีที่แล้ว +1

    Excellent work, one small thing : the alert doesn't work because the redirection is quicker than your alert ;)

    • @balochx
      @balochx 2 ปีที่แล้ว

      i noticed that, but how do we make it work?

  • @TheByteBit
    @TheByteBit 4 ปีที่แล้ว

    great video; thanks for uploading this. One small correction: this is not a "modEl" it's a modAl as in "mo-dal".

  • @jamloop3140
    @jamloop3140 2 ปีที่แล้ว

    great tutorial thank you 🥰

  • @gusp5762
    @gusp5762 4 ปีที่แล้ว

    Great explanation! Very usefull video

  • @kanuwebmedia8250
    @kanuwebmedia8250 4 ปีที่แล้ว

    Very nice boos

  • @gusion_official59
    @gusion_official59 3 ปีที่แล้ว +1

    Thanks bro this awesome 😁

  • @ainunnafil6331
    @ainunnafil6331 2 ปีที่แล้ว

    great tutorial, thank you! it helps a lot 😁

  • @divyabhaskar5948
    @divyabhaskar5948 4 ปีที่แล้ว +1

    Tq so much sir 🙏🙏🙏🙏

  • @mynameishope484
    @mynameishope484 3 ปีที่แล้ว

    you did a really gret job, i understand this immedietly. but can i ask a question? can i save or add data to different table? do i use join for that? thankyou

  • @botoi1118
    @botoi1118 2 ปีที่แล้ว

    Good video but why at the end the script did not run and alert('Data saved')?

  • @GokceTurkmendag
    @GokceTurkmendag 2 ปีที่แล้ว

    Thanks for sharing, it is great!

  • @alcointernationalptyltd3656
    @alcointernationalptyltd3656 3 ปีที่แล้ว

    brother , I tried this for last few days. I cant insert data . dont have any clue where have done mistake
    can you help please . I am very interested to learn more of this series ...

  • @jezreelvillaruelgatmaitan459
    @jezreelvillaruelgatmaitan459 5 ปีที่แล้ว

    Thanks A lot Sir, God bless you

  • @paoabella8981
    @paoabella8981 2 ปีที่แล้ว

    hello if i may ask i have been trying to complete my registration form using this as a basis however everytime I enter a registry entry it always goes to else i tried reversing it however it does not work how do i do this?

  • @alexsircu3916
    @alexsircu3916 3 ปีที่แล้ว

    18:39 Boom!! Thx!

  • @loopymomy2532
    @loopymomy2532 2 ปีที่แล้ว

    This is working. When I do this it always shows as 0 in the database

  • @juangonzales6405
    @juangonzales6405 3 ปีที่แล้ว

    hello a query, how are you valid if the user already exists in the database?

  • @bumshit2160
    @bumshit2160 5 ปีที่แล้ว +3

    Its always says data not saved . I have no error in the insertcodedata . What to do?

    • @anushnaik5898
      @anushnaik5898 4 ปีที่แล้ว

      I also have same problem, what to do?

    • @pandurangpnaik2701
      @pandurangpnaik2701 4 ปีที่แล้ว

      $query = "INSERT INTO news (`ntitle`,`nslug`,`ndescription`) VALUES ('$newstitle','$newsslug','$newsdescription')";
      use ` `(available below esc key) commas for presenting database fields this will solve your problem.

    • @pandurangpnaik2701
      @pandurangpnaik2701 4 ปีที่แล้ว

      see carefully commas they are different

    • @iqbalikhlasulamal3920
      @iqbalikhlasulamal3920 4 ปีที่แล้ว

      @@pandurangpnaik2701 its work for me

  • @elyasayalew9325
    @elyasayalew9325 4 ปีที่แล้ว

    sir thanx for your good and brief tutorial please update us with coming technology in jsp and java area tutorial

  • @dhafer-Alhaidary
    @dhafer-Alhaidary ปีที่แล้ว

    Please when I click save data button, the data not save in my msql and redirect to insertcode.php page

  • @asaduzzamandaria8731
    @asaduzzamandaria8731 3 ปีที่แล้ว

    Thanks a lot for this tutorial. But alert() cannot works when i save button click............

  • @camillev8019
    @camillev8019 2 ปีที่แล้ว

    thank you sir :) but the problem now is the datatable is not working, it always 1 entries even though it has 5 entries

  • @fiqtutorial9788
    @fiqtutorial9788 5 ปีที่แล้ว +1

    Why alert in js not function?

  • @KinferEvans
    @KinferEvans 3 ปีที่แล้ว

    great job but the edit does not work on the second page of datatables

  • @poojam268
    @poojam268 4 ปีที่แล้ว

    my modal popup window doesn't occur when i click on button please help me

  • @harshitsharma5940
    @harshitsharma5940 4 ปีที่แล้ว +1

    Nice dude i was trying it for the whole day , my fault was that i was not placing the form tag outside the model
    Subscribe him :))

  • @wpmaster9869
    @wpmaster9869 2 ปีที่แล้ว

    good

  • @raimondsliepins4622
    @raimondsliepins4622 4 ปีที่แล้ว +1

    JIC anyone runs into the same problem as me that you have 'DATA NOT SAVED' message popping up and nothing is written into the DB, here's one possible solution - remove the quotes around field names in the INSERT statement. Also, redirecting wasn't working for me before I removed the 'DATA SAVED' alert.

  • @usefcorp
    @usefcorp 4 ปีที่แล้ว +1

    Can you include source code in description?

  • @faizatasneem8075
    @faizatasneem8075 4 ปีที่แล้ว

    Great video. I followed your videos. Till, everything worked well. But when I tried this video, It shows "Data Not Saved" or blank page and when I checked on phpmyadmin page, data didn't get save. Please upload a video, what to do when we face such problems.. Thank You..

    • @jonaldlopez6226
      @jonaldlopez6226 3 ปีที่แล้ว

      Have u solved it?

    • @thamiressantos2155
      @thamiressantos2155 3 ปีที่แล้ว

      @@jonaldlopez6226 hi i have the same problem, can you help me?

  • @shubhamtehare
    @shubhamtehare 4 ปีที่แล้ว

    i need help in project when i click button it dosen't popup window. can you help me please.

  • @Jiji_johny
    @Jiji_johny 2 ปีที่แล้ว

    I can't work close button in poppup windows

  • @semicolon4140
    @semicolon4140 2 ปีที่แล้ว

    when i insert more than 20 records in database it shows error, how can I fix this?

  • @atam942
    @atam942 4 ปีที่แล้ว

    thanks you

  • @jerrymapilisam6473
    @jerrymapilisam6473 4 ปีที่แล้ว

    why only one of the modal get the id from the table please reply
    need help

  • @healingscenery-k2g
    @healingscenery-k2g 3 ปีที่แล้ว

    how can i add a validation sir

  • @javazantech
    @javazantech 4 ปีที่แล้ว

    Great Video ! Thanks Man

  • @simplyjemelah8276
    @simplyjemelah8276 ปีที่แล้ว

    Hi please help my local host saya data not saved what could be the problem?

  • @jooliena
    @jooliena 4 ปีที่แล้ว +1

    I guess I'm not the only one experiencing the error where you can't store data in the database. It always says "update failed". What to to do with this error ? Thanks :)

    • @pandurangpnaik2701
      @pandurangpnaik2701 4 ปีที่แล้ว +2

      $query = "INSERT INTO news (`ntitle`,`nslug`,`ndescription`) VALUES ('$newstitle','$newsslug','$newsdescription')";
      use ` `(available below esc key) commas for presenting database fields this will solve your problem.

    • @angelicajosemorales8382
      @angelicajosemorales8382 4 ปีที่แล้ว

      @@pandurangpnaik2701 u da best! thanks a lot!

    • @hersheyaquino7886
      @hersheyaquino7886 3 ปีที่แล้ว

      @@pandurangpnaik2701 it still does not work for me

  • @janeroselitsado1048
    @janeroselitsado1048 3 ปีที่แล้ว

    What editor did u use sir?

  • @abdulkodir4132
    @abdulkodir4132 4 ปีที่แล้ว

    I followed the same tutorial. but the data is not entered into the database. no error message. please help me

  • @hamzaliaqat9259
    @hamzaliaqat9259 5 ปีที่แล้ว

    you are showing only 4 columns but if we have 10 columns then how to show

  • @hiralmehta4616
    @hiralmehta4616 4 ปีที่แล้ว

    when I click on submit button localhost says "data not saved" can you please suggest any solution
    I also tried with echo data and its working but still, it's not going into the database. Do you think is there any problem with my database?

  • @christianracz
    @christianracz 4 ปีที่แล้ว

    after i followed these steps, when i fill up the form on the webpage, it can't be added either insert doesn't work for me (i inserted the database), neither codes work are different. please fix this solution aside this. About the mysql, i proceed it correctly on php, but the mysql doesn't(either using xampp or wampserver). help this problem. ty :(

  • @SaddamHussain-xf3ve
    @SaddamHussain-xf3ve 4 ปีที่แล้ว

    bro how to do this task in PHP 7 version

  • @h.a.6790
    @h.a.6790 4 ปีที่แล้ว +4

    Challenge: Count the number of times he said "Ok".

  • @rmendadala
    @rmendadala 4 ปีที่แล้ว

    Could you please share the video on how to configure the myphpadmin?

  • @arenajovembiulandia8870
    @arenajovembiulandia8870 5 ปีที่แล้ว +1

    sou o único que não conseguiu fazer? quando crio conta não aparece na DB,
    não sei se errei o codigo php, ou se errei no cadastro do DB, mais não acho o erro. :(
    Am I the only one who could not do it? when I create account it does not appear in DB,
    I do not know if I ran the php code, or if I made a mistake in the database of DB, I do not think the error. :(

    • @eliezerviegas514
      @eliezerviegas514 4 ปีที่แล้ว

      Também não consigo fazer, podem ajudar-me?

    • @hersheyaquino7886
      @hersheyaquino7886 3 ปีที่แล้ว

      @@fundaofwebit I get this exact same error :

  • @hamzaliaqat9259
    @hamzaliaqat9259 5 ปีที่แล้ว

    how we can show large amount of data in table

  • @dipeshpatel2876
    @dipeshpatel2876 4 ปีที่แล้ว

    I cant insert data in database. Can you plz help.

    • @pandurangpnaik2701
      @pandurangpnaik2701 4 ปีที่แล้ว +1

      $query = "INSERT INTO news (`ntitle`,`nslug`,`ndescription`) VALUES ('$newstitle','$newsslug','$newsdescription')";
      use ` `(available below esc key) commas for presenting database fields this will solve your problem.

  • @jaidinezhainereinjopia6409
    @jaidinezhainereinjopia6409 5 ปีที่แล้ว +2

    When I click the button save it shows localhost says Data Not Saved
    I have no error in code 🙁🙁 pls answer

    • @fundaofwebit
      @fundaofwebit  5 ปีที่แล้ว

      Echo or dump ur $query n check all the data are coming..
      Thn.. proceed with mysqli_query()

    • @anazaidah2217
      @anazaidah2217 4 ปีที่แล้ว

      Can ur show in another tutorial sir,please answer

    • @ntshepecarolmonate5041
      @ntshepecarolmonate5041 4 ปีที่แล้ว +2

      Hey, what I did to get my code to work was not declare variables. I just added them in the query statement like below:
      $query = "INSERT INTO products (productName, productDescription, productQuantity, productImage) VALUES ('".$_POST["product_name"]."', '".$_POST["product_description"]."', '".$_POST["product_qty"]."', '".$_POST["customFile"]."')";
      What I changed as well was add everything in the isset(). See below
      Hope that helps
      Source: www.tutorialspoint.com/mysqli/mysqli_insert_query.htm

  • @techkylover5288
    @techkylover5288 4 ปีที่แล้ว

    Is your ID is primary key also

    • @fundaofwebit
      @fundaofwebit  4 ปีที่แล้ว

      Yes primary and auto increment.

  • @michaelsenior5904
    @michaelsenior5904 4 ปีที่แล้ว

    why do i get this error for all the fields-- Notice: Undefined index: fname in C:\xampp\htdocs\phpcrud\insert.php on line 13

    • @pandurangpnaik2701
      @pandurangpnaik2701 4 ปีที่แล้ว

      $query = "INSERT INTO news (`ntitle`,`nslug`,`ndescription`) VALUES ('$newstitle','$newsslug','$newsdescription')";
      use ` `(available below esc key) commas for presenting database fields this will solve your problem.

  • @angelodeduyo3862
    @angelodeduyo3862 4 ปีที่แล้ว

    Good why mine is Data Not Saved..

  • @nurtikahht3592
    @nurtikahht3592 3 ปีที่แล้ว

    can you please share all your source code?

  • @pandurangpnaik2696
    @pandurangpnaik2696 4 ปีที่แล้ว

    Can I have source code of this?

  • @swapnilundage6676
    @swapnilundage6676 5 ปีที่แล้ว

    There is no response from the button when i click on it, also the data dose'nt get stored in the db

    • @davinunesvit
      @davinunesvit 5 ปีที่แล้ว

      must be JS, check if you are running js from local or url

    • @swapnilundage6676
      @swapnilundage6676 5 ปีที่แล้ว

      @@davinunesvit i am running it from the URL

    • @joseluiscuevastorres6156
      @joseluiscuevastorres6156 4 ปีที่แล้ว

      same problem, no body helps

    • @swapnilundage6676
      @swapnilundage6676 4 ปีที่แล้ว

      @@joseluiscuevastorres6156 i have actually figured those things out, let me know if you are stuck somewhere

    • @salehsalim2200
      @salehsalim2200 4 ปีที่แล้ว

      @@swapnilundage6676 please show us the way

  • @segba-caba-jorgegalati4296
    @segba-caba-jorgegalati4296 5 ปีที่แล้ว

    me pueden ayudar... cuando presiono submit en el modal me dice que la página no se encuentra. pueden pasarme un correo así les paso el código y me dicen donde está el error

    • @fundaofwebit
      @fundaofwebit  5 ปีที่แล้ว

      Please translate in English.

    • @segba-caba-jorgegalati4296
      @segba-caba-jorgegalati4296 5 ปีที่แล้ว

      @@fundaofwebit
      can you help me ... when I press submit in the modal it tells me that the page is missing. can pass me an email so I pass the code and they tell me where the error is

  • @annbonador
    @annbonador 3 ปีที่แล้ว

    not working

  • @jrnz240
    @jrnz240 2 ปีที่แล้ว

    add validation

  • @jonaldlopez6226
    @jonaldlopez6226 3 ปีที่แล้ว

    Localhost says data not saved anyone?

  • @zenvatech915
    @zenvatech915 4 ปีที่แล้ว

    Hello! Please the source code

  • @انس-خ5ق6س
    @انس-خ5ق6س 4 ปีที่แล้ว

    thanks, can you upload the source code please

  • @Cantakor
    @Cantakor 2 ปีที่แล้ว

    Youre not preparing SQL statements. Thats unsecure

  • @talhasheikh2179
    @talhasheikh2179 2 ปีที่แล้ว

    OK...

  • @joaquinkuster5745
    @joaquinkuster5745 4 ปีที่แล้ว +1

    ok

  • @bryrodri
    @bryrodri 5 ปีที่แล้ว

    Ok

  • @leonardoorden3180
    @leonardoorden3180 4 ปีที่แล้ว

    why u always say ""OK"

    • @fundaofwebit
      @fundaofwebit  4 ปีที่แล้ว +2

      It makes the people understand.. Every line I do code and tell ok...
      Just try once.. Start with OK.. Then they wil understand ur concept very well.. Ok?

    • @h.a.6790
      @h.a.6790 4 ปีที่แล้ว

      Ok

  • @netkongen
    @netkongen 2 หลายเดือนก่อน

    Stop saying OKAY every goddamn sentence :D

  • @muhammadarifvlog4016
    @muhammadarifvlog4016 5 ปีที่แล้ว

    Thanks A lot Sir, God bless you

  • @ijsis4091
    @ijsis4091 2 ปีที่แล้ว

    thank you

  • @dhamakabajar1955
    @dhamakabajar1955 2 ปีที่แล้ว

    thank you