Displaying Content from a MySQL Database in a Webpage

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

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

  • @dailydose7151
    @dailydose7151 3 ปีที่แล้ว +6

    Never stop posting ,this channel got so much potential I really appreciate the help

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

    Thank you for helping me get mine going. Pretag is something I guessI've ignored for years! Great video!

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

      Thanks! The pre tag is helpful to read a large dumps of data. I would never actually use it on a live website, just for debugging.

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

    WOW!!! Exactly what I needed. Thank you for this walk through, Adam! Your efforts are appreciated.

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

    Very useful and well presented teaching. The pacing is just right and slowly spoken 🙂
    I think the music detracts from the tech content though, us geeks are here to listen to what you say, not hear music ;-)

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

      Good feedback! Maybe I'll remove the music altogether. I'm trying to appear like I know how to edit videos. :)

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

      @@codeadamca sound good! Keep up the good work 👍

  • @PixieSpright
    @PixieSpright 3 ปีที่แล้ว +4

    Extremely helpful, and I love your teaching style. Hope your channels sees exponential growth!

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

    Literally exactly what I needed. TYSM!!!

  • @onipaba1469
    @onipaba1469 3 ปีที่แล้ว +2

    Thank you senior! Very useful information

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

    helped a lot, thanks!

  • @the-beauty-of-creativity2083
    @the-beauty-of-creativity2083 ปีที่แล้ว

    Great video. Thanks

  • @Rayan-rn9wm
    @Rayan-rn9wm 2 ปีที่แล้ว +1

    Thank you LEGEND !

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

    Hey Adam! Do I need to save the PHP file somewhere special? I've never used Visual Code before, I'm just using Notepad. I did everything just like you did but it doesn't seem to be making a connection to the local host like at 13:07. So I was wondering if maybe you saved the file at a specific place or something to get it to connect.

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

      Nevermind....I fixed it haha! This video was such a HUGE help btw. Thanks!! :)

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

      Glad you figured it out! Glad the video was a help!

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

    12:50 I am using a different provider > how do you open your webpage? I also tried the Localhost link, but it didnt work

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

      Using a different host should not matter, most hosts follow the same process. Sometimes the folder you upload your code to has a different name, maybe html, www, public, htdocs, etc...

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

    Is it possible to input formulas in myPHPAdmin?

  • @EDC.EveryDayCode
    @EDC.EveryDayCode 2 ปีที่แล้ว

    Can u zoom in your code quite a bit? it's too small to read easily. Also wondering would u use mysqli() these days or PDO? I don't know PDO that well and mysqli seems to do the job but I'm worried about security...

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

      I would use PDO. However, when teaching I often start with mysqli and progress to PDO. If you use mysqli properly it's still quite secure. There's a good discussion here:
      stackoverflow.com/questions/13569/mysqli-or-pdo-what-are-the-pros-and-cons
      And sorry for the small fonts. The fonts are larger in more recent videos.

    • @EDC.EveryDayCode
      @EDC.EveryDayCode 2 ปีที่แล้ว

      @@codeadamca Cool, thanks for the advice and reply ill check out the stackoverflow link, ive got the code written in mysqli (its a fairly big project) and its neat to think about how to switch it over.

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

    I love you😭😭😭

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

    So the username and pw is just in the sourcecode? Isnt this unsafe or something?

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

      PHP is a server-side language (unlike HTML, JavaScript, and CSS). When a PHP file is visited in the browser, the code is converted from PHP to HTML before it leaves the server. All PHP is removed from the file.

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

      @@codeadamca thank you!

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

    Thanks for this great tutorial, much appreciated. I just have two questions.
    1. If you already have a MySQL table with the same values that you created in PHP, would you just import that into PHP instead?
    2. If you wanted to display your values in tables, as you would see when entering your data in PHPMyAdmin, would it be CSS or HTML that would get it to be formatted as a table?

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

      1. Sorry if this first answer is not helpful, I'm not quite sure I understand the first question. If you have data inside a MySQL table, you would not also put that data in your PHP. This way if your database data is updated, your website reflects those updates. Your PHP would use SQL to load the data into a MySQL result and then use PHP loops and arrays to display the data.
      2. If you want to display the data inside a table, you would use HTML tables. In my video I format the data using paragraph and header tags, you would just replace those tags with table, tr, and td tags.
      I will add this to my list of videos to make, but it might be a while. For now, here is a similar question posted on StackOverflow:
      stackoverflow.com/questions/17902483/show-values-from-a-mysql-database-table-inside-a-html-table-on-a-webpage
      Hope that helps!

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

    for me it starts downloading the php page instead of showing it, also i'm missing a "my wbesite" in MAMP localhost

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

      You will need to make sure you are testing the PHP script using a server. Either uploading your PHP to a host or using something like MAMP.

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

    thanks!

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

    Can i use my sql trigger in this?

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

      More details would be helpful. I have never used an SQL trigger before. But from what I do know about them, they are usually connected to an INSERT, UPDATE, or DELETE. This example only uses a SELECT.

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

    If I misstype root it doesn't even give me an error.

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

      Strange. I assume you would have received some sort of MySQL connection error.

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

    I wish you had used the entire screen to demonstrate things. I don’t have one of those huge monitors so I can’t read what you displayed. Also it wold be better to see what you are writing then your face in the corner of screen. imho

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

      Thanks for the feedback! Sorry about the small text, in my more recent videos I have larger text.