Web Design and Programming Pt 19

[ad_1]
This is a review of what you have been taught. I show you how to populate drop down boxes with database information based off of user interaction. Many PHP and SQL techniques are covered. The code is here :


Posted

in

by

Tags:

Comments

27 responses to “Web Design and Programming Pt 19”

  1. Brandon Peterson Avatar

    Love your videos, I'm curious on how to insert an array into a database I think. Like if I have an order form setup that inputs into a database with ordered_by, job, date_required, quantity and description of order, but there would be any number of quantities and descriptions on the same order, thank you for all your work.

  2. jingxing shi Avatar

    Hi Derek Banas

    I tried to run the script, but I there is nothing show in each Select bar when you click it. I checked the database connection, everything is fine. I can not find the problem.

  3. Peteman12 Avatar

    Is there someplace I can find the database creation files, so I don't have to manually track down everything?

  4. Matt Dathew Avatar

    when I select the item in the first dropdown, it reloads and shows the item. However it then reloads and rubs it off. It relods twice

  5. alexander shekhtman Avatar

    I GOT IT WORKING AND THE CODE IS WELL FORMATTED AND COMMENTED!

    The problem was as I said — finding and replacing the " " and ' ' line by line and recompiling because sometimes its not needed to replace. one little wrong " " or ' ' in the wrong place and even though it compiles, the sql is never made or page never refreshed. So I took the code from scratch and went line by line to make it look like my formatted code. And it works great now! Now I know how to make something similar for a much more complex DB; just got to learn how to write more complex SQLs. Thank you so much for this video. And as you said before it is the little thing that corrupts the system. 

  6. alexander shekhtman Avatar

    I found a way to copy your code the way it looks like. i went trough it line by line and ran it. found the " " and ' ' and changed it to mine. when there was and escape " I left it as is    but somehow when it said value=" there was only one " so i changed it to ' ' . it worked the way as expected changing the next drop down to only relevant data. this code is badly formatted not like mine and i still can't see which "" ' ' to changed since it compiles! i guess i have to start formatting your code to look like mine.

  7. alexander shekhtman Avatar

    copied code exactly from your site and it doesn't work. i alway get the same stuff showing up in all boxes no matter what i select in the other ones no matter which order. and when i click submit it says can't fine missing confirm.php file

  8. alexander shekhtman Avatar

    i fixed all the " " and ' ' but it still failed. where is the confirm.php file and the hamtest.php file. those are needed for the program to run, no? 

  9. alexander shekhtman Avatar

    the code is using some confirm.php. where is this code. also when i copied the code it has diff " " and ' '. I think I mentioned this before, so I have to look and replace for them by hand. the automatic search and replace messed things up.

  10. alexander shekhtman Avatar

    i managed to load the data from the dump file into mysql. took me a long time because of proper dir notation and it seemed my sql didn't like the single quote for the name of the db. also what are all those strange command that follow — ? 

    anyways, it worked but looking at the users table it seems you break pretty much all of the rules you told us not to break? are you going to re-do this table? did you like my ideas about how to normalize the cities without using a lookup table for state id? what about my idea for a lookup table for phone types?

    anyways, i hope to understand your code here as it is already very complex

  11. alexander shekhtman Avatar

    didn't get the part about the cgi-bin folder–do this or don't this.
    if do this, what exactly needs to be done?

  12. alexander shekhtman Avatar

    i still don't understand why you needed the javascript, why couldn't php do that?

  13. alexander shekhtman Avatar

    when i copy the code from your site it gets pasted in my text wrangler as one line.

  14. Derek Banas Avatar

    You're very welcome 🙂 I hope to get a chance to improve on the php tutorials soon

  15. Stan Mahan Avatar

    fantastic tutorial. It took a while but once I figured it out I had learned a great deal.
    I did not understand the following comment. ""This line is added to take care if your global variable is off"". Thanks and please keep the tutorials coming.

  16. Derek Banas Avatar

    On occasion in the past I would improve the code on the site. I don't do that anymore. The code on the site is the way to go

  17. Derek Banas Avatar

    @powerhousephg No problem

  18. Derek Banas Avatar

    @powerhousephg I just uploaded the SQL for the database. Go to Web Design and Programming Pt 19 on my site and you'll see the link to the database dumpfile. I hope that helps

  19. Derek Banas Avatar

    @darksideaudio08 Thanks a bunch 🙂

  20. Derek Banas Avatar

    @dcharlequin I sent it to you in a message. Hope it helps, but it hasn't been secured

  21. dcharlequin Avatar

    @derekbanas I am a student and I understand database quite good.

    I am somewhat new to php, yet not totally lost.

    If possible would you please reply with the code for the "confirm.php" page?

    Thanks

  22. Derek Banas Avatar

    @dcharlequin Confirm is just a page that grabs the product page based off of the 3 options picked. It doesn't work without the database. Hope that makes sense? Everything else is on my newthinktank site

  23. dcharlequin Avatar

    where is the code for "confirm.php" ?

  24. Derek Banas Avatar

    @dhruvownege Yes I'm going to do that. Just haven't made it yet. Also working on a huge php security tutorial that is holding me up. Happy new year!

  25. Dhruv Sahni Avatar

    @derekbanas no on the video itself, where is says "derekbanas" you can put a banner there and such since your a partner.

  26. Derek Banas Avatar

    @dhruvownege Who has the best on YouTube? So many channels are boring looking.

  27. Dhruv Sahni Avatar

    you should make a video banner, or something next to your SUBSCRIBE button

Leave a Reply

Your email address will not be published. Required fields are marked *